---
title: "convert(_:to:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiview/convert(_:to:)-1xizt"
---

# convert(_:to:)

Converts a point from the receiver’s coordinate system to that of the specified view.

## Declaration

```swift
func convert(_ point: CGPoint, to view: UIView?) -> CGPoint
```

## Parameters

- `point`: A point specified in the local coordinate system (bounds) of the receiver.
- `view`: The view into whose coordinate system point is to be converted. If view is nil, this method instead converts to window base coordinates. Otherwise, both view and the receiver must belong to the same doc://com.apple.uikit/documentation/UIKit/UIWindow object.

## Return Value

Return Value The point converted to the coordinate system of view.

## See Also

### Converting between view coordinate systems

- [convert(_:from:)](uikit/uiview/convert(_:from:)-8neo1.md)
- [convert(_:to:)](uikit/uiview/convert(_:to:)-2kf3d.md)
- [convert(_:from:)](uikit/uiview/convert(_:from:)-7irzk.md)
