0

I'm using UICollectionview to show 4 cells on each side (paginated). The Collectionview can be scrolled from left to right, snapping itself to always show the next or previous 4 cells. The problem is, the cells are ordered like this:

13
24

and I would like to have them show like this:
12
34

I'm using a flow layout. Is there any easy way of setting this? I would love to avoid sorting my datasource array to fit my expectations.

Thanks.

gasparuff
  • 2,295
  • 29
  • 48

1 Answers1

0

That is the standard layout for UICollectionViewFlowLayout when scrolling horizontally. It doesn't make sense to have it lay out the other way. If you would like it that way you can subclass UICollectionViewFlowLayout and implement your own layout logic.

Fogmeister
  • 76,236
  • 42
  • 207
  • 306