Created
July 27, 2016 00:12
-
-
Save xcadaverx/6a8c6ad2eb1850c471e0a7f42e8ebbd4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TransitioningDelegate: NSObject, UIViewControllerTransitioningDelegate { | |
var openingFrame: CGRect? | |
func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? { | |
let presentationAnimator = PresentationAnimator() | |
presentationAnimator.openingFrame = openingFrame! | |
return presentationAnimator | |
} | |
func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { | |
let dismissAnimator = DismissalAnimator() | |
dismissAnimator.openingFrame = openingFrame! | |
return dismissAnimator | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment