title: NavigationBar not showing when going to another tab in tabview
body: <p>In my app when I navigate to another tab and scroll down the view and gets cut off and the navigation bar doesn't collapse as shown here:</p>
  
  <p><a href="https://i.stack.imgur.com/kxPiu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kxPiu.png" alt="enter image description here"></a></p>
  
  <p>I tried to put <code>.edgesIgnoringSafeArea(.top)</code> but then this happens:</p>
  
  <p><a href="https://i.stack.imgur.com/He8zI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/He8zI.png" alt="enter image description here"></a></p>
  
  <p>When I press the home button the simulator and navigate back to the app the navigation bar will collapse when scrolling as intended. Is this a bug with Xcode? Currently I'm using XCode 11.4.1, testing on an iPhone 11 Pro Max simulator but the exact same result occurs on my physical iPhone 6s Plus.</p>
  
  <p>EDIT: The code for the tab view is as follows:</p>
  
  <pre><code>import SwiftUI
  
  struct MenuScreen: View {
      @State private var selection = 0
      var body: some View {
  
          TabView(selection: $selection){
              ItemsTab().tabItem{
                  Image(systemName: "phone.fill")
                  Text("Items")
              }.tag(0)
              TestTab().tabItem{
                  Image(systemName: "phone.fill")
                  Text("Test")
              }.tag(1)
          }
          .navigationBarTitle("Menu")
  //        .edgesIgnoringSafeArea(.top)
          .navigationBarItems(trailing: NavigationLink(destination:ProfileScreen()){Text("Profile")})
  //        .padding(.top,1)
              .navigationViewStyle(DefaultNavigationViewStyle())
  //        .navigationBarHidden(true)
      }
  }
  
  struct MenuScreen_Previews: PreviewProvider {
      static var previews: some View {
          MenuScreen()
      }
  }
  </code></pre>
  
  <p>The navigation view is wrapped inside a splash screen like so:</p>
  
  <pre><code>import SwiftUI
  
  struct SplashScreen: View {
      @State private var isActive = false
      let content = ContentView()
      var body: some View {
  
          NavigationView{
              VStack{
                  Text("Loading")
                  LoopingAnimation()
                  NavigationLink(destination: content,isActive: $isActive,label: {EmptyView()})
              }.onAppear(perform: {
                  self.goToContentView(time:2.5)
                  }).navigationBarTitle("My app")
          }
      }
      func goToContentView(time:Double){
          DispatchQueue.main.asyncAfter(deadline: .now() + Double(time)){
              self.isActive = true
          }
      }
  }
  
  struct SplashScreen_Previews: PreviewProvider {
      static var previews: some View {
          SplashScreen()
      }
  }
  </code></pre>
  
  <p>EDIT 2: I tried to put navigation views inside the tabview as shown here:</p>
  
  <pre><code>import SwiftUI
  
  struct MenuScreen: View {
      var body: some View {
          TabView{
              NavigationView{
                  ItemsTab().navigationBarTitle("Items")
              }.tabItem{
                      Image(systemName: "house.fill")
                      Text("Items")
              }
              NavigationView{
                  TestTab().navigationBarTitle("Test")
              }.tabItem{
                  Image(systemName: "phone.fill")
                  Text("Test")
              }
  
  
          }
                          .navigationBarHidden(true)
              //            .navigationBarBackButtonHidden(true)
              .frame(alignment: .center)
  //                    .edgesIgnoringSafeArea(.top)
              .navigationBarItems(trailing: NavigationLink(destination:ProfileScreen()){Text("Profile")})
              //        .padding(.top)
              .navigationViewStyle(DefaultNavigationViewStyle())
  
  
  
      }
  }
  
  struct MenuScreen_Previews: PreviewProvider {
      static var previews: some View {
          MenuScreen()
      }
  }
  </code></pre>
  
  <p>But while it resulted in a collapsing navigation bar that worked even switching tabs the result looked like this:<a href="https://i.stack.imgur.com/puOec.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/puOec.png" alt="enter image description here"></a></p>