Только быстрая версия ответа Райли Аврона
let layout = UICollectionViewFlowLayout()
layout.itemSize = CGSizeMake(100, 100)
let collectionView = UICollectionView(frame: CGRectZero, collectionViewLayout: layout)
self.view.addSubview(collectionView)
collectionView.delegate = self
collectionView.dataSource = self
collectionView.registerClass(UICollectionViewCell.self, forCellWithReuseIdentifier: "cellIdentifier")