velocity(in:)
Converts the represented gesture recognizer’s current velocity to a SwiftUI coordinate space of an ancestor of the view the gesture recognizer is attached to.
Declaration
func velocity(in coordinateSpace: some CoordinateSpaceProtocol) -> CGPoint?Parameters
- coordinateSpace:
The SwiftUI coordinate space to convert to.
Discussion
If the gesture recognizer does not implement a velocityInView: method, returns nil.