title: How to change background color of the NavigationView in SwiftUI?
body: <p>I'm trying to change background color of the NavigationView (not navigation bar) using this code:</p>
  
  <pre><code>NavigationView {
      Text("Text")
  }
  .background(Color.clear)
  </code></pre>
  
  <p>But it doesn't work.
  Also, I tried to change UIView appearance:</p>
  
  <pre><code>UIView.appearance().backgroundColor = UIColor.black
  </code></pre>
  
  <p>But it doesn't work too.</p>
  
  <p>The actual result is presented below:</p>
  
  <p><a href="https://i.stack.imgur.com/hefGe.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hefGe.png" alt="enter image description here"></a></p>
  
  <p>The desired result is:</p>
  
  <p><a href="https://i.stack.imgur.com/Tdjz1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Tdjz1.png" alt="enter image description here"></a></p>
  
  <p>Does anyone know how to do this?</p>