<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSView/requiresConstraintBasedLayout",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSView(cpy)requiresConstraintBasedLayout"
  },
  "title" : "requiresConstraintBasedLayout"
}
-->

# requiresConstraintBasedLayout

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

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

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the view must be in a window using constraint-based layout to function properly, <doc://com.apple.documentation/documentation/Swift/false> otherwise.

## Discussion

Custom views should override this to return <doc://com.apple.documentation/documentation/Swift/true> if they can not layout correctly using autoresizing.

---

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)