<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/UIGestureRecognizerRepresentableCoordinateSpaceConverter/velocity(in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI56UIGestureRecognizerRepresentableCoordinateSpaceConverterV8velocity2inSo7CGPointVSgx_tAA0fG8ProtocolRzlF"
  },
  "title" : "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.

```
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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)