func collectionView(_ collectionView: UICollectionView,layout collectionViewLayout: UICollectionViewLayout,sizeForItemAt indexPath: IndexPath) -> CGSize {
var x = CGSize(width: 88, height: 88)
if currentCollectionviewMode == .photos {
if indexPath.row == 0 {
x = CGSize(width: 88, height: 88)
} else {
x = CGSize(width: CGFloat(originalImages[indexPath.row - 1].size.width) / CGFloat(originalImages[indexPath.row - 1].size.height) * 88, height: 88)
}
} else {
x = CGSize(width: 88, height: 88)
}
return x
}
before running this code everything is well, but when this code run my collectionView align change from rtl to ltr my semantic is forceRightToLeft, any suggestion?
I tried CGATransform(scaleX:-1,y:1)
but collectionviewcells
stick to left and with scrollToitem in viewDidAppear()
collectionview show cells bad.