I have a UICollectionView
with a segmented control
to switch between data. But how do I change the UICollectionViewCell
size propertie
Swift 3
override func viewDidLoad() {
super.viewDidLoad()
let cellSize = CGSize(width:80 , height:80)
let layout = UICollectionViewFlowLayout()
layout.scrollDirection = .vertical //.horizontal
layout.itemSize = cellSize
layout.sectionInset = UIEdgeInsets(top: 1, left: 1, bottom: 1, right: 1)
layout.minimumLineSpacing = 1.0
layout.minimumInteritemSpacing = 1.0
myCollectionView.setCollectionViewLayout(layout, animated: true)
myCollectionView.reloadData()
}