Latest 1.0.0
Homepage https://github.com/570262616/TransitionAnimators
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

image

Features

  • dissolve Animator
  • move Animator
  • pan Animator
  • scale Animator
  • source Animator

Communication

  • If you found a bug, open an issue, typically with related pattern.
  • If you have a feature request, open an issue.

Requirements

  • iOS 8.0+
  • Xcode 8.3.2+
  • Swift 3.0+

Installation

CocoaPods

pod 'TransitionAnimators'

Usage

dissolve

class Dissolve: NSObject, UIViewControllerTransitioningDelegate  {

    func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {

        return TransitionAnimators.makeDissolveAnimator(1)
    }
}
in viewController:
lazy var transitioning = Dissolve()

vc.transitioningDelegate = dissolve

self.present(vc, animated: true, completion: nil)

move

class Move: NSObject, UIViewControllerTransitioningDelegate {

    func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {

        return TransitionAnimators.makeMoveInAnimator(1, from: .left)
    }

    func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        return TransitionAnimators.makeMoveOutAnimator(1, to: .left)
    }
}
in viewController:
lazy var transitioning = Move()

vc.transitioningDelegate = move

self.present(vc, animated: true, completion: nil)
Other animated transitions are similar to the code

Latest podspec

{
    "name": "TransitionAnimators",
    "version": "1.0.0",
    "summary": "A few lines of code to integrate common animated transitions",
    "homepage": "https://github.com/570262616/TransitionAnimators",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "zhang peng": "[email protected]"
    },
    "source": {
        "git": "https://github.com/570262616/TransitionAnimators.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Animator/*.*",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This