Instance Property


The active state of the constraint.


@property(getter=isActive) BOOL active;


You can activate or deactivate a constraint by changing this property. Note that only active constraints affect the calculated layout. If you try to activate a constraint whose items have no common ancestor, an exception is thrown. For newly created constraints, the active property is NO by default.

Activating or deactivating the constraint calls addConstraint: and removeConstraint: on the view that is the closest common ancestor of the items managed by this constraint. Use this property instead of calling addConstraint: or removeConstraint: directly.

See Also

Activating and Deactivating Constraints

+ activateConstraints:

Activates each constraint in the specified array.

+ deactivateConstraints:

Deactivates each constraint in the specified array.