Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucoceano/Pager
Pager is the simplest and best way to implement sliding view controllers in Swift
https://github.com/lucoceano/Pager
Last synced: 3 months ago
JSON representation
Pager is the simplest and best way to implement sliding view controllers in Swift
- Host: GitHub
- URL: https://github.com/lucoceano/Pager
- Owner: lucoceano
- License: mit
- Archived: true
- Created: 2015-03-17T03:12:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-06-07T19:08:46.000Z (over 5 years ago)
- Last Synced: 2024-08-06T19:07:08.486Z (3 months ago)
- Language: Swift
- Homepage:
- Size: 126 KB
- Stars: 232
- Watchers: 9
- Forks: 41
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - Pager - Easily create sliding tabs with Pager (UI / Tab Bar)
- awesome-ios-star - Pager - Easily create sliding tabs with Pager (UI / Tab Bar)
README
[![Language](https://img.shields.io/badge/swift-4.0-green.svg)](http://swift.org)
Pager is the simplest and best way to implement sliding view controllers.
## Installation
Drop in the Spring folder to your Xcode project.Or via CocoaPods pre-release:
```CocoaPods
platform :ios, '8.0'
pod 'Pager'
use_frameworks!
```## Usage
Subclass PagerController (as it's a `UIViewController` subclass) and implement data source methods in the subclass.
#### Usage with Code
```Swift
override func viewDidLoad() {
super.viewDidLoad()
self.dataSource = self
}
```
## Data Source```Swift
func numberOfTabs(pager: PagerController) -> Int
func tabViewForIndex(index: Int, pager: PagerController) -> UIView
optional func viewForTabAtIndex(index: Int, pager: PagerController) -> UIView
optional func controllerForTabAtIndex(index: Int, pager: PagerController) -> UIViewController
```## Delegate
```Swift
optional func didChangeTabToIndex(pager: PagerController, index: Int)
optional func didChangeTabToIndex(pager: PagerController, index: Int, previousIndex: Int)
optional func didChangeTabToIndex(pager: PagerController, index: Int, previousIndex: Int, swipe: Bool)
```## Contact
- [Lucas Farah](mailto:[email protected]) - [@7farah7](http://twitter.com/7farah7)
- [Lucas Martins](mailto:[email protected]) - [lucoceano.com](http://www.lucoceano.com)Pager is a port from [CKViewPager](https://github.com/lucoceano/CKViewPager) to swift.
## Licence
Pager is MIT licensed. See the LICENCE file for more info.