<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIAccessibility/convertToScreenCoordinates(_:in:)-9ziiu",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@F@UIAccessibilityConvertFrameToScreenCoordinates"
  },
  "title" : "convertToScreenCoordinates(_:in:)"
}
-->

# convertToScreenCoordinates(_:in:)

Converts the specified rectangle from view coordinates to screen coordinates.

```
@MainActor static func convertToScreenCoordinates(_ rect: CGRect, in view: UIView) -> CGRect
```

## Parameters

`rect`

A rectangle specified in the coordinate system of the specified `view`.

`view`

The view that contains the specified rectangle. This parameter must not be `nil`.

## Return Value

The rectangle in screen coordinates.

## Discussion

Use this function to convert accessibility frame rectangles to screen coordinates.

---

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)