OrderedPageViewController
OrderedPageViewController is a UIPageViewContoller using delegate & dataSource to provide UIViewController with indexes
Installation
CocoaPods
To install OrderedPageViewController with CocoaPods, add the following lines to your Podfile
.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
pod 'OrderedPageViewController'
The Basics
First you must create a OrderedPageViewController and register delegate and dateSource, after that add the controller to your interface
let orderedPageViewController = OrderedPageViewController(transitionStyle: .scroll, navigationOrientation: .horizontal)
orderedPageViewController.orderedDelegate = self
orderedPageViewController.orderedDataSource = self
let navigation = UINavigationController(rootViewController: orderedPageViewController)
navigation.navigationBar.isTranslucent = false
window.rootViewController = navigation
Implements OrderedPageViewControllerDataSource
func orderedPageViewController(_ orderedPageViewController: OrderedPageViewController, viewControllerAt index: Int) -> UIViewController {
return // INSTANCIATE CONTROLLER HERE
}
func numberOfPages(in orderedPageViewController: OrderedPageViewController) -> Int {
return 10
}
Contributing
See CONTRIBUTING.md for more details!
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to contact@digipolitan.com.
License
OrderedPageViewController is licensed under the BSD 3-Clause license.