- present your viewController with slide animation
- set slide direction for left/right/top/bottom
- set presented viewController height (like Half Modal)
- set dim alpha
- set transition duration
- allow Interaction in dismissing viewController.
To run the example project, clone the repo, and run pod install
from the Example directory first.
import SMSlideTransition
initialize SMSlideTransitionDelegate in class variable
let topSlideDelegate = SMSlideTransitionDelegate()
setup parameter to the delegate then assign it to your viewController delegate
topSlideDelegate.slideStyle = .top
topSlideDelegate.allowInteractionOnDismissal = false
topSlideDelegate.heightOfPresentedViewController = 450
yourViewController.transitioningDelegate = topSlideDelegate
yourViewController.modalPresentationStyle = .custom
That's it, now present your viewController.
you can also modify bellow parameters:
topSlideDelegate.roundCorners(corners: [.topLeft, .topRight], radius: 20)
topSlideDelegate.dimScale = 0.7
topSlideDelegate.duration = 0.4
iOS 9
Swift 3
Xcode 8
SMSlideTransition is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "SMSlideTransition"
S.M.Moinuddin, shuvn.eee@gmail.com
SMSlideTransition is available under the MIT license. See the LICENSE file for more info.