---
title: trailingAnchor
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsview/trailinganchor
---

# trailingAnchor

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

## Declaration

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

## Discussion

Discussion Use this anchor to create constraints with the view’s trailing edge. You can only combine this anchor with a subset of the NSLayoutXAxisAnchor anchors. You can combine a trailingAnchor with another trailingAnchor, a leadingAnchor, 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)
- [leadingAnchor](appkit/nsview/leadinganchor.md)
- [leftAnchor](appkit/nsview/leftanchor.md)
- [rightAnchor](appkit/nsview/rightanchor.md)
- [topAnchor](appkit/nsview/topanchor.md)
- [widthAnchor](appkit/nsview/widthanchor.md)
