I’m trying to find a way to have a right to left UICollectionView
using UICollectionViewCompositionalLayout
but there’s no documentation about it. has anybody an idea?
please recommend anything than flipping the UICollectionView
and the cells.
I’m trying to find a way to have a right to left UICollectionView
using UICollectionViewCompositionalLayout
but there’s no documentation about it. has anybody an idea?
please recommend anything than flipping the UICollectionView
and the cells.
3
Answers
Just add below lines in your view controller.
This is extension that over-ride and allow to flip horizontally for RTL layout.
There is a trick it works for me:
and in cellForItemAt :
it depends on your usage if you use in tableviewcell you must set it to layoutSubviews() and if you use it in viewcontroller you must use in after viewdidload lifecycle