SHNDTransition 0.1.2

SHNDTransition 0.1.2

Maintained by Sahand RS.



SHNDTransition

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

If you're a SEGUE fan then you going to like this as HELL!!! 😃 Actually it is easy as breathing

Step 1

Set your segue Kind to Show Detail.

step 1

Step 2

Create an instance of SHNDTransitionController in your FirstViewController class 👇🏻

let transitionDelegate = SHNDTransitionController(animationDuration: 0.5,
                                                  presentTransitionMode: .downToUp,
                                                  dismissTransitionMode: .leftToRight)

presentTransitionMode and dismissTransitionMode are just two simple enums that represent mode of your transition animation.

Step 3

This step happens in your func prepare(for segue: UIStoryboardSegue, sender: Any?) like this 👇🏻

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {

    guard let destination = segue.destination as? SecondViewController else { return }
    destination.transitioningDelegate = self.transitionDelegate
}

Step 4

In your SecondViewController class, you should just dismiss the UIViewController, in here i dismissed it with an UIButton, you can dismiss it with anything you want

@IBAction func dismissVC(_ sender: UIButton) {
    self.dismiss(animated: true, completion: nil)
}

Requirements

Swift 4.0 or Later

Installation

SHNDTransition is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SHNDTransition'

Author

[email protected], [email protected]

License

SHNDTransition is available under the MIT license. See the LICENSE file for more info.