Skip to content

s1Moinuddin/SMSlideTransition

Repository files navigation

SMSlideTransition

CI Status Version License Platform

What you can do?

  • 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.

Transition slide animation

Example

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

Requirements

iOS 9
Swift 3
Xcode 8

Installation

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

pod "SMSlideTransition"

Author

S.M.Moinuddin, shuvn.eee@gmail.com

License

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

About

Custom transition for UIViewController. Slide In/Out transition for top, bottom, left and right direction. Interactive dismissal transition.

Resources

License

Stars

Watchers

Forks

Packages

No packages published