[![CI Status](http://img.shields.io/travis/José Lucas/JLCustomPagingView.svg?style=flat)](https://travis-ci.org/José Lucas/JLCustomPagingView)
To run the example project, clone the repo, and run pod install
from the Example directory first.
JLCustomPagingView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "JLCustomPagingView"
Import it on every file that use this framework.
import JLCustomPagingView
Go to the storyboard that has the View Controller you want to have an instace of JLCustomPagingView
add a view to your view Controller, put all of the constraints you want, after you have to say that view is a JLCustomPagingView
and create an outlet of this JLCustomPagingView
.
@IBOutlet weak var myPagingView: JLCustomPagingView!
After you create the corresponding outlet you should implement the protocols CustomPagingViewDataSource
and CustomPagingViewDelegate
.
class ViewController: UIViewController,CustomPagingViewDataSource,CustomPagingViewDelegate
reloadData()
The number of items you want it to have
numbOfItems()->Int
The item that should stay at index
itemAtIndex(index:Int)->UIView!
This method is called to know if the item at corresponing index should recognize tap events
shouldItemReceiveTapEvents(ItemAtIndex index:Int)->Bool
This method is called when the user taps on the top item
didSelectItemWithIndex(index:Int,item:UIView)
This method is called when the top visible item, so the actived one changes
didChangeTopItemIndexTo(newTopItemIndex:Int,lastTopItemIndex:Int)
José Lucas
JLCustomPagingView is available under the MIT license. See the LICENSE file for more info.