Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tise/swipeableviewcontroller
A small UI component to build UIPageViewController-y views along with a neat iOS 11-y top tab bar in your app.
https://github.com/tise/swipeableviewcontroller
cocoacontrols cocoapods ios swift swift-4 uikit uipageviewcontroller
Last synced: about 1 month ago
JSON representation
A small UI component to build UIPageViewController-y views along with a neat iOS 11-y top tab bar in your app.
- Host: GitHub
- URL: https://github.com/tise/swipeableviewcontroller
- Owner: tise
- License: mit
- Created: 2017-10-23T14:08:50.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-21T09:33:31.000Z (almost 7 years ago)
- Last Synced: 2024-04-20T10:47:13.371Z (7 months ago)
- Topics: cocoacontrols, cocoapods, ios, swift, swift-4, uikit, uipageviewcontroller
- Language: Swift
- Homepage:
- Size: 31.8 MB
- Stars: 14
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwipeableViewController
[![Version](https://img.shields.io/cocoapods/v/SwipeableViewController.svg?style=flat)](http://cocoapods.org/pods/SwipeableViewController)
[![License](https://img.shields.io/cocoapods/l/SwipeableViewController.svg?style=flat)](http://cocoapods.org/pods/SwipeableViewController)
[![Platform](https://img.shields.io/cocoapods/p/SwipeableViewController.svg?style=flat)](http://cocoapods.org/pods/SwipeableViewController)## Example
To test the project, clone this repo and run SwipeableViewController.xcodeproj.
![Example gif](https://github.com/tiseoslo/SwipeableViewController/blob/master/example.gif)## Requirements
- iOS 9
- Swift 4## Installation
SwipeableViewController is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'SwipeableViewController'
```## Usage
```swift
// Make an instance of SwipeableNavigationController
let navigationController = SwipeableNavigationController(navigationBarClass: SwipeableNavigationBar.self, toolbarClass: nil)// Make an instance of SwipeableViewController
let viewController = SwipeableViewController()// Inject data
viewController.swipeableItems = [SwipeableItem(title: "View 1", viewController: ExampleViewController()),
SwipeableItem(title: "View 2", viewController: ExampleViewController()),
SwipeableItem(title: "View 3", viewController: ExampleViewController())]
viewController.selectedIndex = 1// Set the view to the navigation controller (if you want the SwipeableViewController at the root of your navigationController)
navigationController.setViewControllers([viewController], animated: false)
```And you're good to go!
## Author
Oscar Apeland, [email protected]
## License
SwipeableViewController is available under the MIT license. See the LICENSE file for more info.