kk-vv / ZXAutoScrollView

Swift AutoScrollView

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ZXAutoScrollView

CI Status Version License Platform

DataSource

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
}

Delegate

func zxAutoScrolView(_ scrollView: ZXAutoScrollView, selectAt index: Int) {
    print(index)
}

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

DEMO

Requirements

iOS8 or Later

Installation

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'

Author

JuanFelix, hulj1204@yahoo.com

License

ZXAutoScrollView is available under the MIT license. See the LICENSE file for more info.

About

Swift AutoScrollView

License:MIT License


Languages

Language:Swift 94.7%Language:Ruby 5.3%