Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/digipolitan/ordered-page-view-controller
https://github.com/digipolitan/ordered-page-view-controller
Last synced: about 23 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/digipolitan/ordered-page-view-controller
- Owner: Digipolitan
- License: bsd-3-clause
- Created: 2017-07-25T15:41:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-30T17:57:59.000Z (over 5 years ago)
- Last Synced: 2025-01-15T08:34:05.729Z (3 days ago)
- Language: Swift
- Size: 50.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
OrderedPageViewController
=================================[![Swift Version](https://img.shields.io/badge/swift-5.0-orange.svg?style=flat)](https://developer.apple.com/swift/)
[![Build Status](https://travis-ci.org/Digipolitan/ordered-page-view-controller.svg?branch=master)](https://travis-ci.org/Digipolitan/ordered-page-view-controller)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/OrderedPageViewController.svg)](https://img.shields.io/cocoapods/v/OrderedPageViewController.svg)
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Platform](https://img.shields.io/cocoapods/p/OrderedPageViewController.svg?style=flat)](http://cocoadocs.org/docsets/OrderedPageViewController)
[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](http://twitter.com/Digipolitan)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`.
```ruby
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
```swift
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
```swift
func orderedPageViewController(_ orderedPageViewController: OrderedPageViewController, viewControllerAt index: Int) -> UIViewController {
return // INSTANCIATE CONTROLLER HERE
}func numberOfPages(in orderedPageViewController: OrderedPageViewController) -> Int {
return 10
}
```## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for more details!
This project adheres to the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report
unacceptable behavior to [[email protected]](mailto:[email protected]).## License
OrderedPageViewController is licensed under the [BSD 3-Clause license](LICENSE).