Aligning right to left on UICollectionView

前端 未结 13 628
悲哀的现实
悲哀的现实 2020-12-02 08:31

this is a pretty straightforward question, but I haven\'t been able to find a definitive answer to it on SO (if I missed it, please correct me).

Basically, my quest

相关标签:
13条回答
  • 2020-12-02 09:29

    For iOS 9+

    1. Reverse your collectionView in viewDidLoad() with this :

      myCollectionView.transform = CGAffineTransform(scaleX: -1, y: 1)

    2. Reverse-Back your cell (because all things is mirrored) in cellForItemAt with this :

      cell.transform = CGAffineTransform(scaleX: -1, y: 1)

    Now content is on right side and scroll starts from right.

    0 讨论(0)
提交回复
热议问题