<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIView/removeConstraint(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIView(im)removeConstraint:"
  },
  "title" : "removeConstraint(_:)"
}
-->

# removeConstraint(_:)

Removes the specified constraint from the view.

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

## 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 [`isActive`](/documentation/UIKit/NSLayoutConstraint/isActive) property to <doc://com.apple.documentation/documentation/Swift/false> instead of calling the [`removeConstraint(_:)`](/documentation/UIKit/UIView/removeConstraint(_:)) method directly. The [`isActive`](/documentation/UIKit/NSLayoutConstraint/isActive) property automatically adds and removes the constraint from the correct view.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)