I want to reduce the size between cells in row. Now it looks like:
I'm trying this, for reduce the size between them:
let layout: UICollectionViewFlowLayout = UICollectionViewFlowLayout()
layout.sectionInset = UIEdgeInsets(top: 20, left: 2, bottom: 10, right: 2)
layout.minimumInteritemSpacing = 0
layout.minimumLineSpacing = 0
but it doesn't help me. What I do wrong?
Go to the storyboard , right click on collection view and
And Check your minimum spacing between the cell and reduce it to zero .
(Swift 4)