Latest 1.0.6
Homepage https://github.com/DreamFlyingCow/TTWaterFlow
License Apache
Platforms ios 7.0, requires ARC
Authors

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;
    }];

Latest podspec

{
    "name": "TTLayout",
    "version": "1.0.6",
    "platforms": {
        "ios": "7.0"
    },
    "summary": "It is just a custom layout for flow layout, and it can auto calculate the height of the item, and arrange them",
    "homepage": "https://github.com/DreamFlyingCow/TTWaterFlow",
    "license": {
        "type": "Apache",
        "file": "LICENSE"
    },
    "authors": {
        "ZCH": "[email protected]"
    },
    "social_media_url": "http://www.weibo.com/u/2198542311",
    "source": {
        "git": "https://github.com/DreamFlyingCow/TTWaterFlow.git",
        "tag": "1.0.6"
    },
    "source_files": "TTLayout/*",
    "resources": "TTLayout/*",
    "requires_arc": true
}

Pin It on Pinterest

Share This