My app consists of a few views across a few different tabs inside a TabView. These views create their own NavigationViews. Unfortunately the existence of the TabView is causing their colors and transparency to clash with the app's status bar, which is no longer in line with the navigation bar.
This is easily reproduced in a sample app using the following code.
struct ContentView: View {
var body: some View {
TabView {
NavView()
}
}
}
struct NavView: View {
var body: some View {
NavigationView {
List {
ForEach(0..<10, id: \.self) { _ in
Section(header: Text("Foo")) {
Text("Bar")
}
}
}
.listStyle(GroupedListStyle())
.navigationBarTitle("Foobar")
}
}
}
I'm using the grouped list style to make the styling changes more apparent, but it's the same with the default style.
Is there a SwiftUI API to access the status bar styling? Or possibly some other workaround?

