---
title: "deactivate(_:)"
framework: appkit
role: symbol
role_heading: Type Method
path: "appkit/nslayoutconstraint/deactivate(_:)"
---

# deactivate(_:)

Deactivates each constraint in the specified array.

## Declaration

```swift
class func deactivate(_ constraints: [NSLayoutConstraint])
```

## Parameters

- `constraints`: An array of constraints to deactivate.

## Discussion

Discussion This is a convenience method that provides an easy way to deactivate a set of constraints with one call. The effect of this method is the same as setting the isActive property of each constraint to false. Typically, using this method is more efficient than deactivating each constraint individually.

## See Also

### Activating and deactivating constraints

- [isActive](appkit/nslayoutconstraint/isactive.md)
- [activate(_:)](appkit/nslayoutconstraint/activate(_:).md)
