Latest 1.0.0
Homepage https://github.com/s1Moinuddin/SMSlideTransition
License MIT
Platforms ios 9.0
Frameworks UIKit
Authors

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.

Latest podspec

{
    "name": "SMSlideTransition",
    "version": "1.0.0",
    "summary": "A custom UIViewController Modal transition. Slide In/Out transiton",
    "description": "Custom modal transitoin for UIViewController. It presents your viewController on top of a dim/transparent view. You can specify the height of presented viewController, provide topLeft and topRight corner radius, Slide in/out from top bottom left and right direction. Enable/disable interaction on presented viewController dismissal. You can also control transition duration, alpha of the dim view. All you need to do is initialize SMSlideTransitionDelegate give it your desired parameters and assign it to your presented viewController transitioningDelegate. And you also 'don't need to worry about strong reference cycle' due to custom transition.",
    "homepage": "https://github.com/s1Moinuddin/SMSlideTransition",
    "screenshots": [
        "https://cdn.rawgit.com/s1Moinuddin/SMSlideTransition/09fb6842/Screenshots/SMSlideTransition.gif",
        "https://cdn.rawgit.com/s1Moinuddin/SMSlideTransition/09fb6842/Screenshots/SMSlideTransitionInteraction.gif"
    ],
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "S.M.Moinuddin": "shuvn.eee@gmail.com"
    },
    "source": {
        "git": "https://github.com/s1Moinuddin/SMSlideTransition.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "SMSlideTransition/Classes/**/*",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This