Instance Method

invalidateIntrinsicContentSize()

Invalidates the view’s intrinsic content size.

Declaration

func invalidateIntrinsicContentSize()

Discussion

Call this when something changes in your custom view that invalidates its intrinsic content size. This allows the constraint-based layout system to take the new intrinsic content size into account in its next layout pass.

See Also

Measuring in Auto Layout

func systemLayoutSizeFitting(CGSize)

Returns the size of the view that satisfies the constraints it holds.

var intrinsicContentSize: CGSize

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

func contentCompressionResistancePriority(for: UILayoutConstraintAxis)

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

func setContentCompressionResistancePriority(UILayoutPriority, for: UILayoutConstraintAxis)

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

func contentHuggingPriority(for: UILayoutConstraintAxis)

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

func setContentHuggingPriority(UILayoutPriority, for: UILayoutConstraintAxis)

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