<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIView/requiresConstraintBasedLayout",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIView(cpy)requiresConstraintBasedLayout"
  },
  "title" : "requiresConstraintBasedLayout"
}
-->

# requiresConstraintBasedLayout

A Boolean value that indicates whether the receiver 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 cannot 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)