SideMenu icon indicating copy to clipboard operation
SideMenu copied to clipboard

Pan gesture not working correctly

Open Y2JChamp opened this issue 5 years ago • 0 comments

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.

Y2JChamp avatar Dec 18 '19 11:12 Y2JChamp