Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alfian0/d639cbc0ae72ee041230f26f62e6e122 to your computer and use it in GitHub Desktop.
Save alfian0/d639cbc0ae72ee041230f26f62e6e122 to your computer and use it in GitHub Desktop.
extension MenuTransition: UIViewControllerTransitioningDelegate {
func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
state = .present
return self
}
func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
state = .dismiss
return self
}
func interactionControllerForDismissal(using animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? {
return interactor.hasStarted ? interactor : nil
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment