---
title: "velocity(in:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/nsgesturerecognizerrepresentablecoordinatespaceconverter/velocity(in:)"
---

# 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

```swift
func velocity(in coordinateSpace: some CoordinateSpaceProtocol) -> CGPoint?
```

## Parameters

- `coordinateSpace`: The SwiftUI coordinate space to convert to.

## Return Value

Return Value The represented gesture recognizer’s current velocity converted to the given coordinateSpace, or nil if the represented gesture recognizer doesn’t respond to -velocityInView: selector.
