Grid layout with CollectionView in Swift
Create the UICollectionViewController like this in a file that sub-classes from UICollectionViewController: convenience override init() { var layout: UICollectionViewFlowLayout = UICollectionViewFlowLayout() layout.itemSize = CGSizeMake(<width>, <height>) // Setting the space between cells layout.minimumInteritemSpacing = <Space between columns> layout.minimumLineSpacing = <Space between rows> return (self.init(collectionViewLayout: layout)) } In the viewDidLoad you an set the background color like … Read more