Contents

convert(_:to:)

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

Declaration

func convert(_ size: NSSize, to view: NSView?) -> NSSize

Parameters

  • size:

    The size (width and height) 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 to window coordinates instead.

Return Value

The converted size, as an NSSize structure.

Discussion

The returned NSSize values are always forced to have positive a width and height.

See Also

Related Documentation

Converting Coordinate Values