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

# activate(_:)

Activates each constraint in the specified array.

## Declaration

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

## Parameters

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

## Discussion

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

## See Also

### Activating and deactivating constraints

- [isActive](uikit/nslayoutconstraint/isactive.md)
- [deactivate(_:)](uikit/nslayoutconstraint/deactivate(_:).md)
