Here is your quick code:
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
let numberOfCell: CGFloat = 3
let cellWidth = UIScreen.mainScreen().bounds.size.width / numberOfCell
return CGSizeMake(cellWidth, cellWidth)
}
numberOfCell CGFloat, UIScreen.mainScreen().bounds.size.width CGFloat, , numberOfCell, numberOfCell CGFloat, CGFloat Int.