import SwiftUI
import TipKit
@main
struct TipKit_WithPresentPageApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.task {
try? Tips.resetDatastore()
try? Tips.configure([
.datastoreLocation(.applicationDefault)
])
}
}
}
}
import SwiftUI
struct ContentView: View {
@State private var isPresented: Bool = false
var body: some View {
NavigationStack {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
.popoverTip(MyTip())
.padding(100)
Button("Hit Me!") {
isPresented.toggle()
// When the TipKit notification appears, the 'present sheet' button will be non-functional. (iPhone SE and simulator devices)
}
.padding()
.sheet(isPresented: $isPresented) {
PresentPage()
}
}
}
}
}
import SwiftUI
struct PresentPage: View {
var body: some View {
Text("Hello, world again!")
.font(.title)
}
}
import TipKit
struct MyTip: Tip {
var title: Text {
Text("Test")
}
var message: Text? {
Text("Hi")
}
}
When the TipKit notification appears, the ‘present sheet’ button will be non-functional.
When using the iPhone SE or its simulator, running iOS 17.2. Whenever the TipKit notification is triggered and displayed on the screen, the ‘present sheet’ button, which is typically used for presenting a new sheet within the app, becomes non-functional.
Device: iPhoneSE iOS 17.2
enter image description here
Does anyone know how to bypass this bug? Thank you.
Jason Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.