测试已测试 | ✗ |
Lang语言 | Obj-CObjective C |
许可证 | MIT |
发布最新版本 | 2015年3月 |
由 Kyle Truscott 维护。
KTCenterFlowLayout 是 UICollectionViewFlowLayout 的一个子类,将单元格对齐到集合视图的中心。它有效地强制执行了 minimumInteritemSpacing
。
# In your Podfile
pod 'KTCenterFlowLayout'
Objective-C
KTCenterFlowLayout *layout = [KTCenterFlowLayout new];
layout.minimumInteritemSpacing = 10.f;
layout.minimumLineSpacing = 10.f;
[[UICollectionViewController alloc] initWithCollectionViewLayout:layout];
Swift
let layout = KTCenterFlowLayout()
layout.minimumInteritemSpacing = 10.0
layout.minimumLineSpacing = 10.0
UICollectionViewController(collectionViewLayout: layout)
查看 ./Example
应用中使用的布局