<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UILayoutGuide/rightAnchor",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UILayoutGuide(py)rightAnchor"
  },
  "title" : "rightAnchor"
}
-->

# rightAnchor

A layout anchor representing the right edge of the layout guide’s frame.

```
var rightAnchor: NSLayoutXAxisAnchor { get }
```

## Discussion

Use this anchor to create constraints with the layout guide’s right edge. You can only combine this anchor with a subset of the [`NSLayoutXAxisAnchor`](/documentation/UIKit/NSLayoutXAxisAnchor) anchors. You can combine a [`rightAnchor`](/documentation/UIKit/UILayoutGuide/rightAnchor) with another `rightAnchor`, a `leftAnchor`, or a `centerXAnchor`. For more information, see [`NSLayoutAnchor`](/documentation/UIKit/NSLayoutAnchor).

---

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)