---
title: requiresConstraintBasedLayout
framework: appkit
role: symbol
role_heading: Type Property
path: appkit/nsview/requiresconstraintbasedlayout
---

# requiresConstraintBasedLayout

Returns a Boolean value indicating whether the view depends on the constraint-based layout system.

## Declaration

```swift
class var requiresConstraintBasedLayout: Bool { get }
```

## Return Value

Return Value true if the view must be in a window using constraint-based layout to function properly, false otherwise.

## Discussion

Discussion Custom views should override this to return true if they can not layout correctly using autoresizing.

## See Also

### Opting In to Auto Layout

- [translatesAutoresizingMaskIntoConstraints](appkit/nsview/translatesautoresizingmaskintoconstraints.md)
