UIPanGestureRecognizer calls `gestureRecognizerShouldBegin(_:)` with a velocity of zero

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?

Replies

I should add that this is a recognizer that has been added to a UIScrollView.

I understand that the recognizer accessible via the panGestureRecognizer property on UIScrollView can begin with a zero velocity, but this is a recognizer that has been installed to supplement the built-in one. (I need to detect and react to pans and not initiate scrolling.)