PresentationKit is a micro iOS Dynamic Framework with the single purpose of presenting UIViewController
's, from places within your code where you don't have reference to app's view controller hierarchy. A nice example of use case of this library is from within other libraries that need to present an authentication flow and dismiss it on completion.
Build using Swift 4.1, Xcode 9.4.1, supports iOS 8.0+
- import module PresentationKit in the file you want to use the framework
- On a
UIViewController
instance you now will be able to callpresent(animated:, completion:)
and the view controller will be presented in a newUIWindow
on top of all otherUIWindow
's. - When you are done, call
dismiss(animated:, completion:)
on the presentedUIViewController
and the newly createdUIWindow
will be destroyed leaving the user interface in the intial state.
modalTransitionStyle
and modalPresentationStyle
properties of UIViewController
s are taken into account.
- In your
Cartfile
addgithub "stoqn4opm/PresentationKit"
- Link the build framework with the target in your XCode project
For detailed instructions check the official Carthage guides here
- Download the project and build the shared target called
PresentationKit
- Add the product in the list of "embed frameworks" list inside your project's target or create a work space with PresentationKit and your project and link directly the product of PresentationKit's target to your target "embed frameworks" list
The framework is licensed under MIT licence. For more information see file LICENCE