func numberofPages(_ inScrollView: ZXAutoScrollView) -> Int {
return dataCount
}
func zxAutoScrollView(_ scrollView: ZXAutoScrollView, pageAt index: Int) -> UIView {
let view = UILabel()
view.font = UIFont.boldSystemFont(ofSize: 20)
view.textColor = UIColor.white
view.text = "\(index + 1)"
return view
}
func zxAutoScrolView(_ scrollView: ZXAutoScrollView, selectAt index: Int) {
print(index)
}
To run the example project, clone the repo, and run pod install
from the Example directory first.
iOS8 or Later
ZXAutoScrollView is available through CocoaPods. To install it, simply add the following line to your Podfile:
- swift 4.x
pod 'ZXAutoScrollView', '~> 2.0.0'
- swift 3.x
pod 'ZXAutoScrollView', '~> 1.0.4'
JuanFelix, hulj1204@yahoo.com
ZXAutoScrollView is available under the MIT license. See the LICENSE file for more info.