How to manage CollectionView cell size swift

Set IBOutlet for colletionview like:

@IBOutlet weak var collectionViewGallery: UICollectionView!

Write code on ViewDidLoad() for divide screen in 2 part.

collectionViewGallery.backgroundColor = CLEAR_COLOR;                                                              let spacingCell : CGFloat = 8.0      

let cellSize …