How to fill data right to left in UICollectionView

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)

EDIT:

You can make your app completely RTL by doing the following:

  1. Set the minimum deployment target version to iOS 9.0
  2. In your Info.plist, set Localization native development region to your RTL localization. (Like ar_AE for Arabic or fa_IR for Persian-Iran)

swift 3

inside collection view cell

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

in viewdidload

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