---
title: "constraints(activeWhenNearEdge:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitrackinglayoutguide/constraints(activewhennearedge:)"
---

# constraints(activeWhenNearEdge:)

Returns the constraints that the tracking layout guide activates when it’s near the given edge, and deactivates when it’s away from the given edge.

## Declaration

```swift
func constraints(activeWhenNearEdge edge: NSDirectionalRectEdge) -> [NSLayoutConstraint]
```

## Parameters

- `edge`: The edge that the tracking layout guide uses to determine when to activate or deactivate the constraints.

## Return Value

Return Value An array of layout constraints that the tracking layout guide automatically activates and deactivates.

## See Also

### Configuring automatic constraint activation

- [setConstraints(_:activeWhenNearEdge:)](uikit/uitrackinglayoutguide/setconstraints(_:activewhennearedge:).md)
- [setConstraints(_:activeWhenAwayFrom:)](uikit/uitrackinglayoutguide/setconstraints(_:activewhenawayfrom:).md)
- [constraints(activeWhenAwayFrom:)](uikit/uitrackinglayoutguide/constraints(activewhenawayfrom:).md)
