title: Make SwiftUI navigation bar transparent
body: <p>I'm searching for a way to make the NavigationBar transparent. My NavigationView is in the root view in ContentView which contains a TabView. </p>
  
  <pre><code>import SwiftUI
  
  struct ContentView: View {
  var body: some View {
      TabView {
         HomeView().tabItem {
              Image(systemName: "house.fill")
              Text("Home")
          }.tag(1)
          NavigationView {
          SearchView()
              }
  
          .tabItem {
              Image(systemName: "magnifyingglass")
              Text("Search")
          }.tag(2)
  }
  </code></pre>
  
  <p>The NavigationView Bar displays even after adding the following modifier in the root view.</p>
  
  <pre><code>init() { 
  UINavigationBar.appearance().backgroundColor = .clear
  UINavigationBar.appearance().isHidden = false
  </code></pre>
  
  <p>}</p>
  
  <p>Below is the child view in which I'm trying to hide the navigationbar background.</p>
  
  <pre><code>import SwiftUI
  
  struct FacilityView: View {
  
  
  var perks = "Badge_NoPerks"
  var image = "Image_Course6"
  var courseName = "Course"
  
  var body: some View {
      VStack {
          HStack {
              Image(image)
                  .resizable()
                  .aspectRatio(contentMode: .fill)
                  .frame(width: UIScreen.main.bounds.width, height: 260)
          }
          VStack(alignment: .leading) {
              HStack {
                  Image(perks)
              }
              HStack {
                  Text(courseName)
                  Spacer()
              }
          }
          .padding(.horizontal)
          Spacer()
      }.padding(.horizontal)
         .edgesIgnoringSafeArea(.top)
        .navigationBarTitle("Facility Details")
  
  
  }
  </code></pre>
  
  <p>}</p>