2

I want to implement a UICollectionView with multiple sections which each section scrolls horizontally and independently like the attached image

enter image description here

Fatima
  • 464
  • 1
  • 8
  • 19

2 Answers2

0

I suggest you to use UITableView with customized UITableViewCells with UIScrollView as subview on its contentViews. There are many samples, for example here

Community
  • 1
  • 1
Valentin Shamardin
  • 3,569
  • 4
  • 34
  • 51
0

You can use multiple UICollectionViews in table cells. The tableView will scrolls vertically and The collection views can be configured to scroll horizontally by setting particular set of properties which will restrict them to scroll vertically, and they will only scroll horizontally. One constraint to consider is it is much more difficult to do animations that need to move from one table cell to another and you can't use a neat single change of collection view layout to animate all the items in your table view. But if these constraints aren't a problem then this is a relatively easy solution. I also tried it once. It worked for me. Hope that it works for you as well.