Fix tint colour on alerts and dialogs. (#1370)

This commit is contained in:
Doug
2023-07-20 15:37:10 +01:00
committed by GitHub
parent 5a24d0817c
commit 0561bac46b
5 changed files with 13 additions and 9 deletions
@@ -34,10 +34,14 @@ struct Application: App {
var body: some Scene {
WindowGroup {
appCoordinator.toPresentable()
.statusBarHidden(shouldHideStatusBar)
.introspect(.window, on: .iOS(.v16)) { window in
// Workaround for SwiftUI not consistently applying the tint colour to Alerts/Confirmation Dialogs.
window.tintColor = UIColor(Color.compound.textActionPrimary)
}
.task {
appCoordinator.start()
}
.statusBarHidden(shouldHideStatusBar)
}
}