---
title: leadingAnchor
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsview/leadinganchor
---

# leadingAnchor

A layout anchor representing the leading edge of the view’s frame.

## Declaration

```swift
var leadingAnchor: NSLayoutXAxisAnchor { get }
```

## Discussion

Discussion Use this anchor to create constraints with the view’s leading edge. You can only combine this anchor with a subset of the NSLayoutXAxisAnchor anchors. You can combine a leadingAnchor with another leadingAnchor, a trailingAnchor, or a centerXAnchor. For more information, see NSLayoutAnchor.

## See Also

### Creating Constraints Using Layout Anchors

- [bottomAnchor](appkit/nsview/bottomanchor.md)
- [centerXAnchor](appkit/nsview/centerxanchor.md)
- [centerYAnchor](appkit/nsview/centeryanchor.md)
- [firstBaselineAnchor](appkit/nsview/firstbaselineanchor.md)
- [heightAnchor](appkit/nsview/heightanchor.md)
- [lastBaselineAnchor](appkit/nsview/lastbaselineanchor.md)
- [leftAnchor](appkit/nsview/leftanchor.md)
- [rightAnchor](appkit/nsview/rightanchor.md)
- [topAnchor](appkit/nsview/topanchor.md)
- [trailingAnchor](appkit/nsview/trailinganchor.md)
- [widthAnchor](appkit/nsview/widthanchor.md)
