<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/NSRectAlignment",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@E@NSRectAlignment"
  },
  "title" : "NSRectAlignment"
}
-->

# NSRectAlignment

Constants that specify alignment to an edge or a set of edges depending on the user interface layout direction.

```
enum NSRectAlignment
```

## Topics

### Alignments

[`NSRectAlignment.none`](/documentation/UIKit/NSRectAlignment/none)

Has no specified alignment.

[`NSRectAlignment.top`](/documentation/UIKit/NSRectAlignment/top)

Aligns to the top edge.

[`NSRectAlignment.topLeading`](/documentation/UIKit/NSRectAlignment/topLeading)

Aligns to the top and leading edges.

[`NSRectAlignment.leading`](/documentation/UIKit/NSRectAlignment/leading)

Aligns to the leading edge.

[`NSRectAlignment.bottomLeading`](/documentation/UIKit/NSRectAlignment/bottomLeading)

Aligns to the bottom and leading edges.

[`NSRectAlignment.bottom`](/documentation/UIKit/NSRectAlignment/bottom)

Aligns to the bottom edge.

[`NSRectAlignment.bottomTrailing`](/documentation/UIKit/NSRectAlignment/bottomTrailing)

Aligns to the bottom and trailing edges.

[`NSRectAlignment.trailing`](/documentation/UIKit/NSRectAlignment/trailing)

Aligns to the trailing edge.

[`NSRectAlignment.topTrailing`](/documentation/UIKit/NSRectAlignment/topTrailing)

Aligns to the top and trailing edges.



---

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)