convertToScreenCoordinates(_:in:)
Converts the specified rectangle from view coordinates to screen coordinates.
Declaration
@MainActor static func convertToScreenCoordinates(_ rect: CGRect, in view: UIView) -> CGRectParameters
- 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.