Contents

convert(_:to:)

Converts a rectangle from the view’s coordinate system to that of another view.

Declaration

func convert(_ rect: NSRect, to view: NSView?) -> NSRect

Parameters

  • rect:

    A rectangle in the view’s coordinate system.

  • view:

    The view that’s the target of the conversion operation. Both view and the view must belong to the same Nswindow object, and that window must not be nil. If view is nil, this method converts the rectangle to window coordinates instead.

Return Value

The converted rectangle.

See Also

Related Documentation

Converting Coordinate Values