Instance Property

needsUpdateConstraints

A Boolean value indicating whether the view’s constraints need to be updated.

Declaration

@property BOOL needsUpdateConstraints;

Discussion

When a property of your view changes in a way that would impact constraints, set the value of this property to YES to indicate that the constraints need to be updated at some point in the future. The next time the layout process happens, the constraint-based layout system uses the value of this property to determine whether it needs to call updateConstraints on the view. Use this as an optimization tool to batch constraint changes. Updating constraints all at once just before they are needed ensures that you don’t needlessly recalculate constraints when multiple changes are made to your view in between layout passes.

See Also

Triggering Auto Layout

needsLayout

A Boolean value indicating whether the view needs a layout pass before it can be drawn.

- layout

Perform layout in concert with the constraint-based layout system.

- layoutSubtreeIfNeeded

Updates the layout of the receiving view and its subviews based on the current views and constraints.

- updateConstraints

Update constraints for the view.

- updateConstraintsForSubtreeIfNeeded

Updates the constraints for the receiving view and its subviews.