Skip to content

daront/DTSlidingModalSegue

Repository files navigation

DTSlidingModalSegue

Badge w/ Version License Platform

User this segue to present a view controller modally in a UINavigationController(push) style - sliding left or right.

Try demo project for more info.

System Requirements

iOS 8.0+, Swift 3.0

Installation

CocoaPods

Add into your Podfile.

pod "DTSlidingModalSegue"

Then $ pod install

How to use

present - In your storyboard, just assign a class DTSlidingLeftSegue or DTSlidingRightSegue to a segue.

unwind - To dismiss a viewController, you need to create an unwind segue and assign it with a class DTSlidingLeftUnwindSegue or DTSlidingLeftUnwindSegue.

Note: in iOS8 and below, you might need to override segueForUnwindingToViewController

override func segueForUnwindingToViewController(toViewController: UIViewController, fromViewController: UIViewController, identifier: String?) -> UIStoryboardSegue? {
    return DTSlidingRightUnwindSegue(identifier: identifier, source: fromViewController, destination: toViewController)
}

If you don't know wtx is unwind segue, please take a look at this link http://stackoverflow.com/questions/12561735/what-are-unwind-segues-for-and-how-do-you-use-them

Author

Daron Tancharoen

License

DTLoadingIndicator is licensed under the MIT License, please see the LICENSE file.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published