---
title: "convert(_:to:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsview/convert(_:to:)-6u9ir"
---

# convert(_:to:)

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

## Declaration

```swift
func convert(_ point: NSPoint, to view: NSView?) -> NSPoint
```

## Parameters

- `point`: A point specifying a location in the coordinate system of the view.
- `view`: The view into whose coordinate system point is to be converted. Both view and the view must belong to the same doc://com.apple.appkit/documentation/AppKit/NSWindow object, and that window must not be nil. If view is nil, this method converts to window coordinates instead.

## Return Value

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

## See Also

### Related Documentation

- [contentView](appkit/nswindow/contentview.md)
- [ancestorShared(with:)](appkit/nsview/ancestorshared(with:).md)

### Converting Coordinate Values

- [backingAlignedRect(_:options:)](appkit/nsview/backingalignedrect(_:options:).md)
- [convertFromBacking(_:)](appkit/nsview/convertfrombacking(_:)-229ps.md)
- [convertToBacking(_:)](appkit/nsview/converttobacking(_:)-2xx45.md)
- [convertFromLayer(_:)](appkit/nsview/convertfromlayer(_:)-3nsbu.md)
- [convertToLayer(_:)](appkit/nsview/converttolayer(_:)-44u7d.md)
- [convertFromBacking(_:)](appkit/nsview/convertfrombacking(_:)-2njpa.md)
- [convertToBacking(_:)](appkit/nsview/converttobacking(_:)-3zors.md)
- [convertFromLayer(_:)](appkit/nsview/convertfromlayer(_:)-8s5bi.md)
- [convertToLayer(_:)](appkit/nsview/converttolayer(_:)-160pw.md)
- [convertFromBacking(_:)](appkit/nsview/convertfrombacking(_:)-4agf9.md)
- [convertToBacking(_:)](appkit/nsview/converttobacking(_:)-4ra9y.md)
- [convertFromLayer(_:)](appkit/nsview/convertfromlayer(_:)-3usqp.md)
- [convertToLayer(_:)](appkit/nsview/converttolayer(_:)-2vozx.md)
- [convert(_:from:)](appkit/nsview/convert(_:from:)-1dq9l.md)
- [convert(_:from:)](appkit/nsview/convert(_:from:)-40x0w.md)
