How do I enable CollectionView to scroll vertically throughout, scroll horizontally through rows, and move cells to another row?

Asked 2 years ago, Updated 2 years ago, 115 views

I'd like to create something like au's Video Path app where you can scroll vertically and each line can scroll horizontally.
CollectionViewHow can I do it with just one?

CollectionView cells can be pasted with CollectionView, but
I want to be able to do it with one CollectionView.
This is because the implementation of cell movement across Sections simplifies.

Adjusting the sectionInset according to the number of items in the section allows the section to be the same height as the item and always be one-line, but this alone prevents the part of the item from scrolling.I wish I could only bounce a certain part of the item, but I don't know how to do it.

enter image description here

swift xcode

2022-09-30 21:18

1 Answers

It cannot be implemented with UICollecitonView only.
You must place the UICollectionView Cell in the UITableView Cell.

image
Click here for more information. Putting a UICollectionView in a UITableViewCell in Swift
https://ashfurrow.com/blog/putting-a-uicollectionview-in-a-uitableviewcell-in-swift/


2022-09-30 21:18

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.