SideMenu
SideMenu copied to clipboard
Pan gesture not working correctly
Hi, i'm facing the following issue: When the menu is revealed (left menu) i swipe it to right again and it loses its anchor an its x position becomes greater than zero. For this i have made a change to the library:
override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
if let panGesture = gestureRecognizer as? UIPanGestureRecognizer, isMenuRevealed, panGesture.velocity(in: view).x > 0 {
return false
}
return super.gestureRecognizerShouldBegin(gestureRecognizer)
}
The same issue occurs when tapping on the button that calls the revealMenu and at the same time swiping right.