I have already looked up:-
UICollectionView distance between cells?
Cell spacing in UICollectionView
Decrease Space between UICollectionViewCells
but none of them worked for me.
I also tried implementing the UICollectionViewDelegateFlowLayout and implemented
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
return 3
}
but it has no effect on it.
Please have a look at the following screenshots taken in iPhone 7 / iPhone 5s / iPhone 7 Plus (picture order is same)
I also looked self-sizing cells, but I don't want self-sizing cells, as my item size is always fixed and meets my requirements.
I have also set the minimum spacing of cells in the storyboard but it has no effect on the layout.
How to reduce the big gap between the two cells (interitem spacing), avoid clipping in the iPhone 5S and also the empty spaces on the right side in the iPhone 7 Plus (you can't see since the background is white)
Any insights will be appreciated.