Im working on an iOS app in Swift, using a UICollectionView. Iām autosizing collection view cells:
if let cvl = collectionView.collectionViewLayout as? UICollectionViewFlowLayout {
cvl.estimatedItemSize = CGSize(width: 240, height: 70)
}
It is working fine, every cell is autosized perfectly. But I have an issue when I rotated the device.
If first cell is not visible and device is rotated, then scrolling to top in order to make first cell visible -> all cells are autosized correctly, but first cell is overlapped. Not getting any warning or message on Debug Area.
If first cell is visible and device is rotated -> all cells are autosized correctly, first cell not is overlapped.
Does anyone have any idea what is going on?