I have a UICollectionViewController
using a UICollectionViewFlowLayout
where my itemSize
is the size of the UICollectionView
This issue just occured to me on 3x screens (namely the iPhone 6 Plus.) As it turned out, the autolayout engine did not really like infinite floating point values (such as .33333333), so my solution was to floor
the return height in sizeForItemAt:indexPath:
.
return CGSize(width: preferredWidth, height: floor(preferredHeight))