---
title: "convertToScreenCoordinates(_:in:)"
framework: uikit
role: symbol
role_heading: Type Method
path: "uikit/uiaccessibility/converttoscreencoordinates(_:in:)-9ziiu"
---

# convertToScreenCoordinates(_:in:)

Converts the specified rectangle from view coordinates to screen coordinates.

## Declaration

```swift
@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

Return Value The rectangle in screen coordinates.

## Discussion

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

## See Also

### Conversions

- [convertToScreenCoordinates(_:in:)](uikit/uiaccessibility/converttoscreencoordinates(_:in:)-6dx4a.md)
