Instance Method

removeConstraints(_:)

Removes the specified constraints from the view.

Declaration

func removeConstraints(_ constraints: [NSLayoutConstraint])

Parameters

constraints

The constraints to remove.

Discussion

When developing for iOS 8.0 or later, use the NSLayoutConstraint class’s deactivate(_:) method instead of calling the removeConstraints(_:) method directly. The deactivate(_:) method automatically removes the constraints from the correct views.