Aligns collection view cells to the center of the screen.
KTCenterFlowLayout is a subclass of UICollectionViewFlowLayout which Aligns cells to the center of a collection view. It effectively enforces the
# In your Podfile
KTCenterFlowLayout *layout = [KTCenterFlowLayout new]; layout.minimumInteritemSpacing = 10.f; layout.minimumLineSpacing = 10.f;
[[UICollectionViewController alloc] initWithCollectionViewLayout:layout];
let layout = KTCenterFlowLayout() layout.minimumInteritemSpacing = 10.0 layout.minimumLineSpacing = 10.0
See the layout in use in the
This layout doesn't work with
This layout doesn't work with self-sizing collection view cells (
estimatedItemSize). Of course, neither does the vanilla
UICollectionViewFlowLayout. Pull requests appreciated from anybody interested in solving self-sizing layouts!