---
title: topAnchor
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uilayoutsupport/topanchor
---

# topAnchor

A layout anchor representing the guide’s top edge.

## Declaration

```swift
var topAnchor: NSLayoutYAxisAnchor { get }
```

## Discussion

Discussion Use this anchor to create constraints with the guide’s top edge. You can only combine this anchor with other NSLayoutYAxisAnchor anchors. For more information, see NSLayoutAnchor.

## See Also

### Creating constraints using layout anchors

- [bottomAnchor](uikit/uilayoutsupport/bottomanchor.md)
- [heightAnchor](uikit/uilayoutsupport/heightanchor.md)
