title: SwiftUI - How to get a transparent status bar when in a tabbed view?
body: <p>My app first root view is a tabbed view with two tabs. The second tab is a navigation view with a form. The setting can be summarised like this:</p>
  
  <pre><code>struct ContentView: View {
    var body: some View {
      TabView {
        // First view
        // ...
  
        NavigationView {
          Form {
            // Form details
            // ...
          }
        }
        .tabItem {
          // Text and image for the tab view item
        }
      }
    }
  }
  
  </code></pre>
  
  <p>Problem is that the form view's background is not white, it is slightly contrasted (as for grouped lists) and this creates a disgraceful separation with the status bar at the top:</p>
  
  <p><a href="https://i.stack.imgur.com/zs5ZF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zs5ZF.jpg" alt="enter image description here"></a></p>
  
  <p>This behaviour is not present in other app such as Apple ones. For instance the main view of Pages app is a tab view and the status bar remains transparent and of the same colour as the top bar title.</p>
  
  <p><a href="https://i.stack.imgur.com/VBp8U.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VBp8U.jpg" alt="enter image description here"></a></p>
  
  <p>I'd like the same behaviour as the iPhone settings app, with a header colour matching the status bar view.</p>
  
  <p>The problem here seems to be the tab view that takes control of the status bar appearance, if I remove it all goes normal.</p>
  
  <p>Is there a way to get this behaviour inside a tab view?</p>