Skip to content

Instantly share code, notes, and snippets.

@tylerlantern
Last active December 27, 2018 09:35
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 tylerlantern/e2934caca4e2436590ddebe8439af297 to your computer and use it in GitHub Desktop.
Save tylerlantern/e2934caca4e2436590ddebe8439af297 to your computer and use it in GitHub Desktop.
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