Hello! Based on the lack of forum posts, I think I'm one of the first people to really be diving into TipKit. :) I'm trying to use a tip to coax users toward a button in the toolbar of a NavigationView
. The docs say to put the TipView
"close to the content", but the best I can do for the NavigationView toolbar is to put it in one of the views inside the Navigation View itself. I'm using a TipView
with an arrowEdge: .top
parameter, which results in this:
I'd love to be able to move the arrow tip under the plus button. Is that possible in this early beta stage? Do I need to restructure my view hierarchy somehow?
The reason the tip isn't working with the toolbar button is a known issue in TipKit. It only affects buttons that are placed in SwiftUI toolbars. Until that gets fixed, here’s a workaround you can use: apply a style to the button. It can be any style. Some examples are bordered
, borderless
, plain
and borderedProminent
. Here's a fixed version of your code that uses this workaround:
ToolbarItem(placement: .topBarLeading) {
Button(action: {isSetting = true}) {
Label("Edit", systemImage: "gear").labelStyle(.iconOnly)
}
.buttonStyle(.plain) // This line fixes the issue!
.popoverTip(editTip)
}
Give this a shot and let us know if it works.