Contents

convert(_:to:)

Converts a rectangle from the current window’s coordinate system to the coordinate system of another window.

Declaration

func convert(_ rect: CGRect, to window: UIWindow?) -> CGRect

Parameters

  • rect:

    A rectangle in the current window’s coordinate system.

  • window:

    The window defining the destination coordinate system for rect. Specify nil to convert the rectangle to the logical coordinate system of the screen, which is measured in points.

Return Value

The rectangle converted to the coordinate system of window.

See Also

Converting coordinates