I have added a "welcome" tip to my SwiftUI app, which only appears on the main screen the first time the app is launched.
On macOS and iOS, the TipView has an X button that lets the user dismiss the tip.
However, on tvOS there is no such button, and I cannot figure out how to dismiss the tip at all. Using the remote, I am unable to navigate to the tip and highlight it so I can click it to dismiss. Pressing the Home remote button while the tip is displayed has no effect other than closing my app and going back to the tvOS launch screen.
Am I missing something?
struct ContentView: View {
@Environment(TempestDataProvider.self) private var dataProvider
@State private var welcomeTip = WelcomeTip()
var body: some View {
VStack {
Grid {
GridRow {
TemperatureMetricBox(alignment: .leading, backgroundStyle: nil, bottomPadding: true)
WindMetricBox(alignment: .trailing, backgroundStyle: nil, bottomPadding: true)
}
GridRow {
HumidityMetricBox(alignment: .leading, backgroundStyle: nil, bottomPadding: true)
PressureMetricBox(alignment: .trailing, backgroundStyle: nil, bottomPadding: true)
}
GridRow {
RainMetricBox(alignment: .leading, backgroundStyle: nil, bottomPadding: true)
SunMetricBox(alignment: .trailing, backgroundStyle: nil, bottomPadding: true)
}
GridRow {
LightningMetricBox(alignment: .leading, backgroundStyle: nil, bottomPadding: true)
MetricBox(alignment: .trailing, systemImageName: "sensor", backgroundStyle: nil, bottomPadding: true) {
IndicatorLightPanel()
}
}
}
.fixedSize(horizontal: false, vertical: true)
Spacer()
TipView(welcomeTip)
StatusBar()
}
}
}