I have a collection view and I would like to have let\'s say 4 cells per row. I know that to accomplish this all I need to do is divide collectionview.frame.size.width
collectionview.frame.size.width
(collectionView.frame.size.width-50)/4
To account for the space, you can subtract it from the collection view frame width (subtracting 5*10).
5*10