Instance Method

removeConstraint:

Removes the specified constraint from the view.

Declaration

- (void)removeConstraint:(NSLayoutConstraint *)constraint;

Parameters

constraint

The constraint to remove. Removing a constraint not held by the view has no effect.

Discussion

When developing for iOS 8.0 or later, set the constraint’s active property to NO instead of calling the removeConstraint: method directly. The active property automatically adds and removes the constraint from the correct view.

See Also

Managing the View’s Constraints

constraints

The constraints held by the view.

- addConstraint:

Adds a constraint on the layout of the receiving view or its subviews.

- addConstraints:

Adds multiple constraints on the layout of the receiving view or its subviews.

- removeConstraints:

Removes the specified constraints from the view.