I try inside of viewDidLoad
the next code:
let layout: UICollectionViewFlowLayout = UICollectionViewFlowLayout()
layout.minimumInteritemSpacing = 0
layout.minimumLineSpacing = 0
but it doesn't work. What is the reason of this? Any ideas?
I try inside of viewDidLoad
the next code:
let layout: UICollectionViewFlowLayout = UICollectionViewFlowLayout()
layout.minimumInteritemSpacing = 0
layout.minimumLineSpacing = 0
but it doesn't work. What is the reason of this? Any ideas?
You should be set direction is horizontally. You need delete the code for the reason below:
"For a horizontally scrolling grid, this value represents the minimum spacing between items in the same column. This spacing is used to compute how many items can fit in a single line, but after the number of items is determined, the actual spacing may possibly be adjusted upward."