title: SwiftUI TabView with nested NavigationView
body: <p>to summarize my problem:
  My application contains a <code>TabView</code> on the root level. The children of the TabView must be searchable (using the apple native <code>.searchable(...)</code> modifier. Additionally at least one of the views must be able to push a third view on the stack which hides the TabBar on the bottom.</p>
  <p>The problem with that is that both approaches: Using one single NavigationView in the root view and using additional navigation views inside the child views did not work.</p>
  <p>Using only one NavigationView:</p>
  <ul>
  <li>TabBar gets overlayed when navigating to another acitivty ✔</li>
  <li>Not searchable ❌</li>
  </ul>
  <p>Using nested NavigationViews:</p>
  <ul>
  <li>TabBar is always visible also in the full screen activity ❌</li>
  <li>Desired title + search behavior ✔</li>
  </ul>
  <p>Root View:</p>
  <pre class="lang-swift prettyprint-override"><code>public enum TestNavItemId: String, CaseIterable, Equatable {
      case activity1 = &quot;activity1&quot;
      case activity2 = &quot;activity2&quot;
  
      public static func == (lhs: NavItemId, rhs: NavItemId) -&gt; Bool {
          lhs.rawValue == rhs.rawValue
      }
  }
  
  struct DemoView: View {
      var body: some View {
          NavigationView {
              TabView {
                  Activity1()
                          .tabItem {
                              Image(systemName: &quot;house.fill&quot;)
                              Text(LocalizedStringKey(TestNavItemId.activity1.rawValue))
                          }
                          .tag(TestNavItemId.activity1)
                  Text(&quot;Nothing to see here&quot;)
                          .tabItem {
                              Image(systemName: &quot;fire&quot;)
                              Text(LocalizedStringKey(TestNavItemId.activity2.rawValue))
                          }
                          .tag(TestNavItemId.activity2)
              }
          }
      }
  }
  </code></pre>
  <p>Activity1:</p>
  <pre class="lang-swift prettyprint-override"><code>struct Activity1: View {
  
      @State private var query: String = &quot;&quot;
  
      var body: some View {
          NavigationView {
              VStack {
                  Text(&quot;Content&quot;)
                  NavigationLink(destination: Text(&quot;Full Screen View&quot;)) {
                      Text(&quot;Open full screen view&quot;)
                  }
              }
                      .searchable(text: $query)
          }
      }
  }
  </code></pre>
  <p>Any help is much appreciated!</p>