Contents

sizeThatFits(_:)

Asks the control to calculate and return the size that best fits the specified size.

Declaration

func sizeThatFits(_ size: NSSize) -> NSSize

Parameters

  • size:

    The size for which the control should calculate its best-fitting size.

Return Value

A new size that fits the receiver’s subviews.

Discussion

By default, this method returns the intrinsicContentSize of the receiver.

See Also

Resizing the Control