CocoaPods trunk is moving to be read-only. Read more on the blog, there are 7 months to go.
| TestsTested | ✗ |
| LangLanguage | SwiftSwift |
| License | MIT |
| ReleasedLast Release | May 2016 |
| SPMSupports SPM | ✗ |
Maintained by dev-alex.
Custom modal transition animation
Just add the ScaleTransition.swift file to your project.
or use CocoaPods with Podfile:
pod 'ScaleTransition', '~> 1.0.2'// 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)
}
}ScaleTransition is released under the MIT license. See LICENSE for details.
If you have any questions, you can write me [email protected]