项目介绍:
重用机制,像Tableview 一样使用 控件,简单。
https://github.com/klbest1/MyIOSDemo/tree/master/ImageSwiper
extension ViewController:ImageScrollerDelegate{
func numerOfCells() -> Int {
return dataSrouce.count
}
func cellForRowAtIndex(index: NSInteger,imageContentView:YKIMageContentView) -> YKImageViewCell {
var cell = imageContentView.dqueueReuseCell()
if cell == nil {
cell = YKImageViewCell(frame: CGRect(x: 0, y: 0, width: 260, height: 300))
}
let proerpty = dataSrouce[index];
cell?.titleLabel.text = "\(index)号女生