InteractiveSideMenu
InteractiveSideMenu copied to clipboard
Adjusting Gesture Area for view?
How can i achieve a wider recognition area for the menu pull out? currently by default its on the very edge of the view and it would be good to have a slightly wider area available
Hi @jackdem,
Currently, there is no public API to make this but you can change the behaviour by changing UIGestureRecognizer
from UIScreenEdgePanGestureRecognizer
to UIPanGestureRecognizer
in source code here.
Example:
// Replace it
let screenEdgePanRecognizer = UIScreenEdgePanGestureRecognizer(
target: navigationMenuTransitionDelegate.interactiveTransition,
action: #selector(MenuInteractiveTransition.handlePanPresentation(recognizer:))
)
screenEdgePanRecognizer.edges = .left
self.view.addGestureRecognizer(screenEdgePanRecognizer)
// with
let panRecognizer = UIPanGestureRecognizer(
target: navigationMenuTransitionDelegate.interactiveTransition,
action: #selector(MenuInteractiveTransition.handlePanPresentation(recognizer:))
)
self.view.addGestureRecognizer(panRecognizer)
Hope it will help you.
Thanks for asking the question. We added this request to to-do
list.