title: How to prevent NavigationView from affecting subviews
body: <p>I'd like to use a NavigationView for several reasons but when I wrap my view hierarchy in a NavigationView, things get messed up. Screen 1 shows the effect i'm after but the NavigationView has not been added yet.  The code for screen 1 is:</p>
  <pre><code>struct ContentView: View {
      var body: some View {
  
          VStack(spacing:0) {
              Text(&quot;Text Above List&quot;)
                  .frame(width: 375, height: 44)
                      .background(Color.gray)
              List() {
                  Text(&quot;Row 1&quot;)
                  Text(&quot;Row 2&quot;)
                  Text(&quot;Row 3&quot;)
                  Text(&quot;Row 4&quot;)
                  Text(&quot;Row 5&quot;)
                }
           }
      }
   }
  </code></pre>
  <p>By wrapping in a NavigationView the result is screen 2.  Code for screen 2 is:</p>
  <pre><code>    struct ContentView: View {
      var body: some View {
          NavigationView {
              VStack(spacing:0) {
                  Text(&quot;Text Above List&quot;)
                      .frame(width: 375, height: 44)
                      .background(Color.gray)
                  List() {
                      Text(&quot;Row 1&quot;)
                      Text(&quot;Row 2&quot;)
                      Text(&quot;Row 3&quot;)
                      Text(&quot;Row 4&quot;)
                      Text(&quot;Row 5&quot;)
                  }
              }
              .navigationBarHidden(true)
          }
      }
  }
  </code></pre>
  <p>Then by adding &quot;.listStyle(GroupedListStyle())&quot; the result is screen 3 - which is close but no cigar.  I can't get rid of the space above the list but below the Text view above it.  The space is obviously the header view but I can't make it go away.  Code for screen 3 is:</p>
  <pre><code>struct ContentView: View {
      var body: some View {
          NavigationView {
              VStack(spacing:0) {
                  Text(&quot;Text Above List&quot;)
                      .frame(width: 375, height: 44)
                      .background(Color.gray)
                  List() {
                      Text(&quot;Row 1&quot;)
                      Text(&quot;Row 2&quot;)
                      Text(&quot;Row 3&quot;)
                      Text(&quot;Row 4&quot;)
                      Text(&quot;Row 5&quot;)
                  }
                  .listStyle(GroupedListStyle())
              }
              .navigationBarHidden(true)
          }
      }
  }
  </code></pre>
  <p>Any help with this would be greatly appreciated.  I have pulling my hair out over this for way too long.  Thanks.<a href="https://i.stack.imgur.com/MFHHB.jpg" rel="nofollow noreferrer">enter link description here</a></p>
  <p>Tap the link &quot;enter link description here&quot; above, to see referenced screens.</p>