/TTWaterFlow

This is a demo about waterFlow With UICollectionView

Primary LanguageObjective-CApache License 2.0Apache-2.0

TTWaterFlow

This is a demo about waterFlow With UICollectionView

演示.gif
在适当的位置加上这个代码块, 返回值是item的高度, 这样就可以自动布局了
[self.layout computeIndexCellHeightWithWidthBlock:^CGFloat(NSIndexPath *indexPath, CGFloat width) {
        
        int randomNum = arc4random_uniform(200);
        
        return (CGFloat)randomNum;
    }];