Latest 1.0.3
Homepage https://github.com/dev-aleksey/ScaleTransition
License MIT
Platforms ios 8.0, requires ARC
Authors

Custom modal transition animation

Animation

Requirements

  • iOS 8.0+
  • Xcode 7.2

Installation

Just add the ScaleTransition.swift file to your project.

or use CocoaPods with Podfile:

pod 'ScaleTransition', '~> 1.0.3'

Usage

// create viewcontroller
let storyboard = UIStoryboard(storyboard: .Main)
let detail: DetailViewController = storyboard.instantiateViewController()

// configure transition    
detail.transitioningDelegate = self
detail.modalPresentationStyle = .Custom

// present viewController    
navigationController?.presentViewController(detail, animated: true, completion: nil)
// MARK: transition delegate
extension ViewController: UIViewControllerTransitioningDelegate {

  func animationControllerForPresentedController(presented: UIViewController,
                           presentingController presenting: UIViewController,
                                   sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? {

    return ScaleShowTransition(duration: 0.5, scale: 0.9)
  }

  func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
    return ScaleHideTransition(duration: 0.5, scale: 0.9)
  }
}

Licence

ScaleTransition is released under the MIT license.
See LICENSE for details.

About

If you have any questions, you can write me [email protected]

Latest podspec

{
    "name": "ScaleTransition",
    "version": "1.0.3",
    "summary": "Custom modal transition animation.",
    "license": "MIT",
    "homepage": "https://github.com/dev-aleksey/ScaleTransition",
    "authors": {
        "Alex": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/dev-aleksey/ScaleTransition.git",
        "tag": "1.0.3"
    },
    "source_files": "scaletransitiondemo/ScaleTransition/*.swift",
    "requires_arc": true
}

Pin It on Pinterest

Share This