SwiftUI Navigation and status bar clash in color/transparency when inside TabView
As per Apple's documentation, edgesIgnoringSafeArea(_:)
should be applied to TabView
:
https://developer.apple.com/documentation/swiftui/vsplitview/3288813-edgesignoringsafearea
Extends the view out of the safe area on the specified edges.
struct ContentView: View {
var body: some View {
TabView {
NavView()
} // .edgesIgnoringSafeArea(.top) no longer necessary as of iOS 13.4
}
}
NOTE: It appears Apple changed the default behavior and this is no longer necessary with iOS 13.4.