OrderedPageViewController is a UIPageViewContoller using delegate & dataSource to provide UIViewController with indexes
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'
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
func orderedPageViewController(_ orderedPageViewController: OrderedPageViewController, viewControllerAt index: Int) -> UIViewController {
return // INSTANCIATE CONTROLLER HERE
}
func numberOfPages(in orderedPageViewController: OrderedPageViewController) -> Int {
return 10
}
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.
OrderedPageViewController is licensed under the BSD 3-Clause license.