UIView animation based on UIPanGestureRecognizer velocity
The docs say The velocity of the pan gesture, which is expressed in points per second. The velocity is broken into horizontal and vertical components. So I’d say, given you want to move your view xPoints (measured in pt) to let it go off-screen, you could calculate the duration for that movement like so: CGFloat … Read more