测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布最后发布 | 2017年8月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 ‘huangdaxia’ 维护。
let layout = KSYCollectionViewLayout()
layout.delegate = self
let collect = UICollectionView(frame: CGRect.zero, collectionViewLayout: layout)
extension ViewController: KSYCollectionViewLayoutDelegate {
func numberOfColumn(in collectionView: UICollectionView) -> Int {
return columnCount
}
func collectionView(_ collectionView: UICollectionView, layout: KSYCollectionViewLayout, heightForItemAt indexPath: IndexPath) -> CGFloat {
let height = 200 + arc4random() % 100
return CGFloat(height)
}
}