Last active
December 27, 2018 09:35
-
-
Save tylerlantern/e2934caca4e2436590ddebe8439af297 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
func interactionControllerForDismissal(using animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? { | |
return interactionTransition.transitionInProgress ? interactionTransition : nil | |
} | |
func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? { | |
presentationAnimator = BHMenuPresentation(presentedViewController: presented, presenting: presenting) | |
interactionTransition.attachViewController(presentedViewController : presented) | |
interactionTransition.setUpGestureOnView(view: presentationAnimator?.dimmingView) | |
interactionTransition.setUpGestureOnView(view: presented.view) | |
return presentationAnimator | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment