The layout object is responsible for positioning the items in the collection view. It can be used to customize the appearance of each cell inside the UIViewCollection. There are different cell types (decorators) which can be specified. Now, we will discuss the default layout implementation, UICollectionViewFlowLayout.
This layout arranges all items in a grid. It's a perfect solution for the multi device apps because it uses the whole screen estate and it's different for different iOS devices. The algorithm positions all items on the screen using the whole available space, starting from top to bottom. Based on the scroll direction, the next cells are populated with views. The class provides a neat delegate object of type ICollectionViewDelegateFlowLayout ...