Swifty view controller presentation for iOS
Swifty wrappers around view controller presentation, dismissal, and UIPresentationController
. See my blog post and talk at Realm.
- Xcode 7.3+
- iOS 8.0+
- Swift 2.2+
CocoaPods (recommended)
use_frameworks!
# For latest release in cocoapods
pod 'PresenterKit'
# Feeling adventurous? Get the latest on develop
pod 'PresenterKit', :git => 'https://github.com/jessesquires/PresenterKit.git', :branch => 'develop'
github "jessesquires/PresenterKit"
Read the docs. Generated with jazzy. Hosted by GitHub Pages. More information on the gh-pages
branch.
import PresenterKit
- Watch the talk
- Read the blog post
- Run the example project
let vc = MyViewController()
presentViewController(vc, type: .Modal(.WithNavigation, .FormSheet, .CoverVertical))
let vc = MyViewController()
presentViewController(vc, type: .Push)
let vc = MyViewController()
let config = PopoverConfig(source: .BarButtonItem(item), delegate: self)
presentViewController(vc, type: .Popover(config))
vc.dismiss()
There's a suite of unit tests for PresenterKit
. To run them, open PresenterKit.xcodeproj
, select the PresenterKit
scheme, then โ-u.
Please follow these contribution guidelines.
Created and maintained by @jesse_squires.
PresenterKit
is released under an MIT License. See LICENSE
for details.
Copyright ยฉ 2016-present Jesse Squires.
Please provide attribution, it is greatly appreciated.