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

# velocity(in:)

Interprets the velocity of the pan gesture in the coordinate system of the specified view.

## Declaration

```swift
func velocity(in view: UIView?) -> CGPoint
```

## Parameters

- `view`: The view in whose coordinate system the velocity of the pan gesture is computed.

## Return Value

Return Value The velocity of the pan gesture, which is expressed in points per second. The velocity is broken into horizontal and vertical components.

## See Also

### Tracking the location and velocity of the gesture

- [translation(in:)](uikit/uipangesturerecognizer/translation(in:).md)
- [setTranslation(_:in:)](uikit/uipangesturerecognizer/settranslation(_:in:).md)
