OrderedPageViewController 1.1.0

OrderedPageViewController 1.1.0

TestsTested
LangLanguage SwiftSwift
License BSD-3-Clause
ReleasedLast Release May 2019
SPMSupports SPM

Maintained by Benoit BRIATTE.



  • By
  • Digipolitan

OrderedPageViewController

Swift Version Build Status CocoaPods Compatible Carthage Compatible Platform Twitter

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 [email protected].

License

OrderedPageViewController is licensed under the BSD 3-Clause license.