Contents

convert(_:from:)

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

Declaration

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

Parameters

  • rect:

    The rectangle in the view coordinate system.

  • view:

    The view with rect in its coordinate system. 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 from window coordinates instead.

Return Value

The converted rectangle.

See Also

Related Documentation

Converting Coordinate Values