You want to provide a grid-like layout to your collection view so that your content can render in a way similar to that shown in Figure 5-1.
Create an instance of the
UICollectionViewFlowLayout class, instantiate
your collection view controller using the
initializer of the
UICollectionViewController class, and pass
your layout object to this method.
A flow layout can easily be instantiated, but before it can be
passed to a collection view, it has to be configured. Here we are going
to discuss the various properties that you can tweak on an instance of
and how they can affect the rendering of your collection view
A floating point value that dictates to the flow layout the minimum number of points it has to reserve between each row. The layout object may decide to allocate more space in order to make the layout look good, but it must not allocate less. If your collection view is too small for the items to fit into it, your items will be clipped, just like any other view in the iOS SDK.
A floating point value to indicate the minimum number of points that the layout should reserve between cells on the same row. Again, this is the minimum number of points, and the layout, depending on the size of the collection view, may decide to increase this number.
CGSize that specifies the size ...