Skip to content

DreamFlyingCow/TTWaterFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TTWaterFlow

This is a demo about waterFlow With UICollectionView

演示动画

演示.gif

如何使用TTLayout

  • cocoapods导入:pod 'TTLayout'
  • 手动导入:
    • TTLayout文件夹中的所有文件拽入项目中
    • 导入主头文件:#import "TTLayout.h"

具体用法:

在适当的位置加上这个代码块, 返回值是item的高度, 这样就可以自动布局了...

[self.layout computeIndexCellHeightWithWidthBlock:^CGFloat(NSIndexPath *indexPath, CGFloat width) {
        
        // block返回值就是你的item的高度
        
        int randomNum = arc4random_uniform(200);
        return (CGFloat)randomNum;
    }];


About

This is a demo about waterFlow With UICollectionView

Resources

License

Stars

Watchers

Forks

Packages

No packages published