0
votes

I have a section which is scrollable horizontally with paging and other sections normal with vertical scrolling enabled in UICollectionView.

Now the thing is UICollectionViewLayout has contentSize property which is defined for whole CollectionView.

But I want only 1 section horizontally scrollable in vertical scrollable collectionViewLayout.

I know I can use another collectionView in a section to do this.

But can I avoid that??

1
What do you mean by "1 section horizontally scrollable in vertical scrollable collectionViewLayout"?Monolo
I meant one section like a normal horizontally scrollable paging enabled.user1010819
But the collection view in totality is vertically scrollable view.user1010819

1 Answers

0
votes

No, the only way to do what you are trying to achieve is to use nested views. One way to do it is to use custom cells in a vertically scrolling UICollectionView, each of these cells contains its own horizontally scrolling UICollectionView. Presumably all but one of those will not contain enough cells to warrant any horizontal scrolling in that "row" of your outer view. Since the outer view is vertically scrolling, you could use a UITableView for it instead of a UICollectionView.