I'm using a UIPanGestureRecognizer and wish to prevent the start of the gesture unless the angle of the pan falls within a certain range.
To do this, I'm implementing the gestureRecognizerShouldBegin(_:) method in the recognizer's delegate and computing the angle based on the gesture velocity.
However, with relative frequency, I'm noticing that this method is called with a velocity/translation of zero (requested via velocity(in:) and translation(in:) respectively). This is occurring with pronounced gestures that you would intuitively expect to be non-zero.
Is it expected that gestureRecognizerShouldBegin(_:) will be called by a pan gesture recognizer with a zero velocity/translation?
To do this, I'm implementing the gestureRecognizerShouldBegin(_:) method in the recognizer's delegate and computing the angle based on the gesture velocity.
However, with relative frequency, I'm noticing that this method is called with a velocity/translation of zero (requested via velocity(in:) and translation(in:) respectively). This is occurring with pronounced gestures that you would intuitively expect to be non-zero.
Is it expected that gestureRecognizerShouldBegin(_:) will be called by a pan gesture recognizer with a zero velocity/translation?