App was rejected yesterday for this bug — what’s up Apple?
Post
Replies
Boosts
Views
Activity
It looks like the problem was your "Label" in the button.
If you just use an Image as your button content, the tip will work:
import SwiftUI
import TipKit
struct ContentView: View {
@State var isSetting = false
var body: some View {
NavigationStack {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
Text("isSetting: \(isSetting.description)")
}
.padding()
.navigationTitle("Hello World")
.toolbar {
ToolbarItem(placement: .topBarLeading) {
Button(action: { isSetting = true} ){
Image(systemName: "gear")
}
.popoverTip(TestTip())
}
}
}
}
}
struct TestTip: Tip {
var title: Text {
Text("This is only a test")
}
}
#Preview {
ContentView()
}
Yes -- use the .popoverTip modifier on the "+" button in your ToolBarItem directly.
.popoverTip takes a tip: parameter that will be the Tip struct you've already defined. It also takes an arrowEdge.
Seeing identical behavior. One caveat is my current code is using the back-ported Swift concurrency on iOS 14. The app works fine in simulator and device with Xcode on iOS 14, but crashes on launch with TestFlight build. The TestFlight build works on iOS 15. Haven't tried using older code, but based on what we're both seeing, I think this is an Apple/TestFlight issue they need to fix.