<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICoordinateSpace",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UICoordinateSpace"
  },
  "title" : "UICoordinateSpace"
}
-->

# UICoordinateSpace

A set of methods for converting between different frames of reference on a screen.

```
@MainActor protocol UICoordinateSpace : NSObjectProtocol
```

## Overview

The [`UIView`](/documentation/UIKit/UIView) class adopts this protocol so that you can convert easily between most coordinate spaces in your app. The [`UIScreen`](/documentation/UIKit/UIScreen) class includes the [`coordinateSpace`](/documentation/UIKit/UIScreen/coordinateSpace) and [`fixedCoordinateSpace`](/documentation/UIKit/UIScreen/fixedCoordinateSpace) properties, which give you access to the screen’s coordinate spaces. You can adopt this protocol in your own classes to convert between your custom coordinate spaces and the coordinate spaces of your app’s views and screens.

In iOS 8 and later, window and screen coordinate spaces aren’t fixed to a specific device orientation. Instead, window and screen coordinates change to match the app’s interface orientation, which typically (but not always) matches the current device orientation. (View controllers still determine which interface orientations the app supports.) Rotating the window and screen simplifies the interactions between views, windows, and the screen. In cases where you still need a fixed frame of reference — for example, because you need to store the location of a touch event or onscreen item persistently — you can use the methods of this protocol to convert coordinate values to the fixed coordinate space provided by the [`UIScreen`](/documentation/UIKit/UIScreen) object.

To convert a point from a view’s current coordinate space to the screen’s fixed coordinate space, use code similar to the following:

```objc
[myView convertPoint:point toCoordinateSpace:myView.window.screen.fixedCoordinateSpace];
```

When implementing the methods of this protocol, you must convert coordinate values to or from your local coordinate space. When performing such conversions, use the screen coordinate space as an intermediate coordinate space, converting to screen coordinates before converting to the target coordinate space. For example, when converting from your local coordinate space to the coordinate space of another view, convert your local coordinates to the screen coordinate space first and then convert those screen coordinates to the coordinate space of the view.

## Topics

### Getting the bounds rectangle

[`bounds`](/documentation/UIKit/UICoordinateSpace/bounds)

The bounds rectangle describing the item’s location and size in its own coordinate system.

### Converting between coordinate spaces

[`convert(_:to:)`](/documentation/UIKit/UICoordinateSpace/convert(_:to:)-2ub7a)

Converts a point from the coordinate space of the current object to the specified coordinate space.

[`convert(_:from:)`](/documentation/UIKit/UICoordinateSpace/convert(_:from:)-3w27q)

Converts a point from the specified coordinate space to the coordinate space of the current object.

[`convert(_:to:)`](/documentation/UIKit/UICoordinateSpace/convert(_:to:)-3imkt)

Converts a rectangle from the coordinate space of the current object to the specified coordinate space.

[`convert(_:from:)`](/documentation/UIKit/UICoordinateSpace/convert(_:from:)-9921a)

Converts a rectangle from the specified coordinate space to the coordinate space of the current object.



---

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)