title: Make TabView Background Transparent
body: <p>Views in SwiftUI have a transparent background by default. This usually means that they have a white background because that's the default background color of your app. However, this also means that you can use a <code>ZStack</code> to change the background color of your entire app and that color will show through all your views unless you explicitly set their own background color:</p>
  <pre><code>struct Main: View {
      var body: some View {
          ZStack {
              Color.orange.edgesIgnoringSafeArea(.all)
  
              // Sub-view inlined
              VStack {
                  Text(&quot;Hello World&quot;)
                  Button(&quot;Press Me&quot;, action: { print(&quot;Pressed&quot;) })
              }
          }
      }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/qxCNn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qxCNn.png" alt="enter image description here" /></a></p>
  <p>The problem I have run into is that this is not true for a <code>TabView</code>:</p>
  <pre><code>struct Main: View {
      var body: some View {
          ZStack {
              Color.orange.edgesIgnoringSafeArea(.all)
  
              // Sub-view inlined
              TabView {
                  VStack {
                      Text(&quot;Hello World&quot;)
                      Button(&quot;Press Me&quot;, action: { print(&quot;Pressed&quot;) })
                  }.tabItem {
                      Text(&quot;First Page&quot;)
                  }
              }
          } 
      }
  }
  </code></pre>
  <p>The <code>TabView</code> blocks the background color:</p>
  <p><a href="https://i.stack.imgur.com/WC1te.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WC1te.png" alt="enter image description here" /></a></p>
  <p>I can change the background color of the subview, but if I make it transparent, the background is white again instead of showing the underlying color in the <code>ZStack</code>. I've also tried sundry other ways to make the <code>TabView</code> transparent, such as setting its background to <code>Color.clear</code>, but to no avail.</p>
  <p><strong>TL;DR</strong></p>
  <p>Is it possible to make a <code>TabView</code> transparent instead of white?</p>