-
Notifications
You must be signed in to change notification settings - Fork 2
Component List
Azen Xu edited this page Feb 29, 2016
·
4 revisions
Wiki填写模板
## 名称(v最新版本号)
1. 作用
2. 用法
3. 使用代码举例
(4. 其他)
From:维护人
##LoopPage(v0.0.2)
- 作用:轮播图控件
- 用法:
- 使用
init(frame: CGRect, timeInter: NSTimeInterval, countClosur: LoopPageCountClosure, pageClosure: LoopPageCurrentViewClosure, actionClosure: LoopPageTapActionClosure)的便捷构造方法创造LoopPage对象 - 通过闭包设置数据源和每个轮播图的点击事件
- timeInterval设置为0时,不启用自动轮播
- 使用代码举例:
lazy var loopPage : LoopPage = {
let page = LoopPage(frame: CGRect(x: 0,y: 0,width: 375,height: 100), timeInter: 0, countClosur: { () -> Int in
return 5
}, pageClosure: { (pageIndex) -> UIView in
let label = UILabel(frame: CGRect(x: 0, y: 0, width: 50, height: 50))
label.text = "pageIndex:\(pageIndex)"
label.textAlignment = NSTextAlignment.Center
return label
}, actionClosure: { (pageIndex) -> Void in
print("\(pageIndex)")
})
return page
}()From:Azen.Xu