To run the example project, clone the repo, and run pod install from the Example directory first.
| Direction | Image |
|---|---|
| UICollectionViewScrollDirectionVertical | ![]() |
| UICollectionViewScrollDirectionHorizontal | ![]() |
- vertical and horizontal scroll direction;
- different row/col count with different section;
- section headerView and footerView;
- contentInset of collectionView;
- inset for section;
- updates of UICollectionView cells;
- same usage as UICollectionViewFlowLayout.
iOS 6.0+
JQCollectionViewWaterfallLayout is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'JQCollectionViewWaterfallLayout'- property
layout.numberOfColumns = 3;- or delegate
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfColumnsInSection:(NSInteger)section {
return [self.data[section][@"column"] integerValue];
}(see more detail in Example Project)
coder-zjq, zjq_joker@163.com
JQCollectionViewWaterfallLayout is available under the MIT license. See the LICENSE file for more info.

