Instance Property

fittingSize

The minimum size of the view that satisfies the constraints it holds.

Declaration

@property(readonly) NSSize fittingSize;

Discussion

AppKit sets this property to the best size available for the view, considering all of the constraints it and its subviews hold and satisfying a preference to make the view as small as possible. The size values in this property are never negative.

See Also

Measuring in Auto Layout

intrinsicContentSize

The natural size for the receiving view, considering only properties of the view itself.

- invalidateIntrinsicContentSize

Invalidates the view’s intrinsic content size.

- contentCompressionResistancePriorityForOrientation:

Returns the priority with which a view resists being made smaller than its intrinsic size.

- setContentCompressionResistancePriority:forOrientation:

Sets the priority with which a view resists being made smaller than its intrinsic size.

- contentHuggingPriorityForOrientation:

Returns the priority with which a view resists being made larger than its intrinsic size.

- setContentHuggingPriority:forOrientation:

Sets the priority with which a view resists being made larger than its intrinsic size.