ZKCollectionViewFreezeLayout
描述
ZKCollectionViewFreezeLayout 扩展了 UICollectionViewLayout。
支持水平和垂直滚动方向。
可以设置冻结列数和行数。
示例
要运行示例项目,首先克隆存储库,然后在 Example 目录中运行 pod install
。
示例代码如下。
let layout = ZKCollectionViewFreezeLayout()
layout.delegate = self
layout.freezeColum = 3
layout.freezeRow = 2
layout.itemSize = CGSize(width: 70, height: 70)
collectionView.setCollectionViewLayout(layout, animated: false)
collectionView.backgroundColor = UIColor.whiteColor()
collectionView.bounces = false
需求
- iOS 8.0+
- Xcode 10.2
- Swift 5
安装
ZKCollectionViewFreezeLayout通过CocoaPods提供。要安装它,只需在Podfile中添加以下行
pod "ZKCollectionViewFreezeLayout"
作者
Rafael Zhou
- 给我发邮件:[email protected]
- 在Twitter上关注我:@wumingapie
- 在Facebook上联系我:wumingapie
- 在LinkedIn上联系我:Rafael
授权
ZKCollectionViewFreezeLayout在MIT授权下提供。有关更多信息,请参阅LICENSE文件