When you use UIPanGestureRecognizer
, you have translationInView:
and velocityInView:
speed is the speed at which the user moves his finger, in pixels per second. You can use the speed to determine the inertia that the user "gives" the view when their finger rises (the state of the recognizer is UIGestureRecognizerStateEnded
).
source share