ANDistributedFlowLayout is a subclass of UICollectionViewFlowLayout which distributes cells evenly in across each row.
# In your Podfile
pod 'ANDistributedFlowLayout'
Objective-C:
ANDistributedFlowLayout *layout = [ANDistributedFlowLayout new];
layout.minimumInteritemSpacing = 10.f;
layout.minimumLineSpacing = 10.f;
[[UICollectionViewController alloc] initWithCollectionViewLayout:layout];
Swift:
let layout = ANDistributedFlowLayout()
layout.minimumInteritemSpacing = 10.0
layout.minimumLineSpacing = 10.0
UICollectionViewController(collectionViewLayout: layout)
See the layout in use in the ./Example
app: