TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Aug 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by ‘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)
}
}