---
title: "removeConstraint(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiview/removeconstraint(_:)"
---

# removeConstraint(_:)

Removes the specified constraint from the view.

## Declaration

```swift
func removeConstraint(_ constraint: NSLayoutConstraint)
```

## Parameters

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

## Discussion

Discussion When developing for iOS 8.0 or later, set the constraint’s isActive property to false instead of calling the removeConstraint(_:) method directly. The isActive property automatically adds and removes the constraint from the correct view.

## See Also

### Managing the view’s constraints

- [constraints](uikit/uiview/constraints.md)
- [addConstraint(_:)](uikit/uiview/addconstraint(_:).md)
- [addConstraints(_:)](uikit/uiview/addconstraints(_:).md)
- [removeConstraints(_:)](uikit/uiview/removeconstraints(_:).md)
