Instance Method

contentCompressionResistancePriorityForAxis:

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

Declaration

- (UILayoutPriority)contentCompressionResistancePriorityForAxis:(UILayoutConstraintAxis)axis;

Parameters

axis

The axis of the view that might be reduced.

Return Value

The priority with which the view should resist being compressed from its intrinsic size on the specified axis.

Discussion

The constraint-based layout system uses these priorities when determining the best layout for views that are encountering constraints that would require them to be smaller than their intrinsic size.

Subclasses should not override this method. Instead, custom views should set default values for their content on creation, typically to UILayoutPriorityDefaultLow or UILayoutPriorityDefaultHigh.

See Also

Measuring in Auto Layout

- systemLayoutSizeFittingSize:

Returns the optimal size of the view based on its current constraints.

- systemLayoutSizeFittingSize:withHorizontalFittingPriority:verticalFittingPriority:

Returns the optimal size of the view based on its constraints and the specified fitting priorities.

intrinsicContentSize

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

- invalidateIntrinsicContentSize

Invalidates the view’s intrinsic content size.

- setContentCompressionResistancePriority:forAxis:

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

- contentHuggingPriorityForAxis:

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

- setContentHuggingPriority:forAxis:

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