KTCenterFlowLayoutSwift 0.0.2

KTCenterFlowLayoutSwift 0.0.2

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最新版本2015年3月

Kyle Truscott 维护。



KTCenterFlowLayout

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 应用中使用的布局