iDeveloper iDeveloper - 4 months ago 24
Swift Question

How to use collectionview

I am trying how to use collectionview

Thanks.

Answer

Creation of a custom UICollectionViewFlowLayout maybe is the most straight answer, but it's too expensive. I always rather use this way (Flip the collectionView and it's subviews).

Inside init or viewDidLoad() put this:

self.collectionView.transform = CGAffineTransformMakeScale(-1, 1)

Inside collectionView:cellForItemAtIndexPath: or cell class put this:

cell.transform = CGAffineTransformMakeScale(-1, 1)
Comments