Instance Property


A Boolean value indicating whether the constraints impacting the layout of the view incompletely specify the location of the view.


@property(readonly) BOOL hasAmbiguousLayout;


The value of this property is YES when the view’s location or size cannot be determined definitively based on the current constraints.

Accessing this property engages the layout engine to determine whether any other frame would also satisfy the constraints on the view. Because this process involves laying out the view, accessing the property can be an expensive operation but it can also provide useful debugging information. AppKit automatically calls this method when a window is asked to visualize its constraints using the visualizeConstraints: method.

See Also

Debugging Auto Layout

- constraintsAffectingLayoutForOrientation:

Returns the constraints impacting the layout of the view for a given orientation.

- exerciseAmbiguityInLayout

Randomly changes the frame of a view with an ambiguous layout between the different valid values.