<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSLayoutConstraint/Relation-swift.enum",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSLayoutRelation"
  },
  "title" : "NSLayoutConstraint.Relation"
}
-->

# NSLayoutConstraint.Relation

The relation between the first attribute and the modified second attribute in a constraint.

```
enum Relation
```

## Topics

### Constants

[`NSLayoutConstraint.Relation.lessThanOrEqual`](/documentation/AppKit/NSLayoutConstraint/Relation-swift.enum/lessThanOrEqual)

The constraint requires the first attribute to be less than or equal to the modified second attribute.

[`NSLayoutConstraint.Relation.equal`](/documentation/AppKit/NSLayoutConstraint/Relation-swift.enum/equal)

The constraint requires the first attribute to be exactly equal to the modified second attribute.

[`NSLayoutConstraint.Relation.greaterThanOrEqual`](/documentation/AppKit/NSLayoutConstraint/Relation-swift.enum/greaterThanOrEqual)

The constraint requires the first attribute to be greater than or equal to the modified second attribute.



---

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)