---
title: "tipAnchor(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/tipanchor(_:)"
---

# tipAnchor(_:)

Sets a value for the specified tip anchor to be used to anchor a tip view to the .bounds of the view.

## Declaration

```swift
nonisolated func tipAnchor<AnchorID>(_ id: AnchorID) -> some View where AnchorID : Hashable, AnchorID : Sendable

```

## Parameters

- `id`: The anchored view’s identifier.

## Return Value

Return Value A new version of the view that writes to the key.

## Discussion

Discussion Use this modifier to specify an anchor view for a TipView’s arrow to point towards. struct TrailRow: View {     let trail: Trail

var body: some View {         HStack {             Text(trail.name)

Button(action: trail.favorite) {                 Image(systemName: "star")             }             .tipAnchor("FavoriteTrailTipAnchor")         }

TipView(FavoriteTrailTip(), anchorID: "FavoriteTrailTipAnchor")     } }

## See Also

### Providing tips

- [popoverTip(_:arrowEdge:action:)](swiftui/view/popovertip(_:arrowedge:action:).md)
- [popoverTip(_:isPresented:attachmentAnchor:arrowEdge:action:)](swiftui/view/popovertip(_:ispresented:attachmentanchor:arrowedge:action:).md)
- [popoverTip(_:isPresented:attachmentAnchor:arrowEdges:action:)](swiftui/view/popovertip(_:ispresented:attachmentanchor:arrowedges:action:).md)
- [tipBackground(_:)](swiftui/view/tipbackground(_:).md)
- [tipBackgroundInteraction(_:)](swiftui/view/tipbackgroundinteraction(_:).md)
- [tipCornerRadius(_:antialiased:)](swiftui/view/tipcornerradius(_:antialiased:).md)
- [tipImageSize(_:)](swiftui/view/tipimagesize(_:).md)
- [tipViewStyle(_:)](swiftui/view/tipviewstyle(_:).md)
- [tipImageStyle(_:)](swiftui/view/tipimagestyle(_:).md)
- [tipImageStyle(_:_:)](swiftui/view/tipimagestyle(_:_:).md)
- [tipImageStyle(_:_:_:)](swiftui/view/tipimagestyle(_:_:_:).md)
