Skip to content

Instantly share code, notes, and snippets.

@laevandus
Last active August 23, 2018 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laevandus/aacae5923a30f6c857169b3a435ef03c to your computer and use it in GitHub Desktop.
Save laevandus/aacae5923a30f6c857169b3a435ef03c to your computer and use it in GitHub Desktop.
final class ViewController: UIViewController, UIViewControllerTransitioningDelegate {
@objc func showView() {
let presentedViewController = PresentedViewController()
presentedViewController.modalPresentationStyle = .custom
presentedViewController.transitioningDelegate = self
present(presentedViewController, animated: true, completion: nil)
}
private let transition = CustomTransition()
func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return transition
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment