You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
menuAnimator =MenuTransitionAnimator(mode: .presentation, shouldPassEventsOutsideMenu: false) { [unownedself] in
73
+
self.dismiss(animated: true, completion: nil)
71
74
}
72
75
```
73
76
If you want, for example, to dismiss your menu when a tap outside menu takes place, you should pass 'false' to 'shouldPassEventsOutsideMenu' flag and assign a 'tappedOutsideHandler'.In fact, you are free to do whatever you want when a tap outside menu occurs or, if you want to have access to your content view controller, just pass 'true' and assign 'tappedOutsideHandler' to nil.
74
77
6. Implement classof UIViewControllerTransitioningDelegate that will return our menuAnimator from method animationControllerForPresentedController and assign it to transitioningDelegate of menu view controller(Don't forget to set .Custom modal presentation style). To dismiss menu you should returnMenuTransitionAnimator(mode: .Dismissal) from animationControllerForDismissedController method.
0 commit comments