I need to prepare a layout like IOS spring board i.e Grids with horizontal scrolling, pagination enabled and most importantly Cells should be arranged row wise not column wise(in 2nd image).I tried to do this using UICollectionViewFlowLayout but it arranges the cells column wise(like first image).
Later i come to know, this can be achieved with UICollectionViewLayout but i'm bit confused with the Apple Documentation on few points:
1.How to get horizontal Scrolling using UICollectionViewLayout.
2.Can we enable pagination.
3.Is it using Rows & columns concepts.
UiCollectionviewLayout doesn't have any default scrolling property.If we set the ContentSize more in Width it will automatically enable Horizontal Scrolling ,same for vertical scrolling and if fill in both width and height it will enable both horizontal and vertical scrolling.
Pagination can enabled by using :
collectionviewlayout.collectionview.pagingEnabled = YES;
It don't have any Rows & Column concept,it all depends upon the user
customisation.
Apple Documentation For UICollectionViewLayout
Damir.me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With