title: SwiftUI Navigation Bar Colour
body: <p>I am trying to build a master/detail type sample application and I'm struggling to get the NavigationBar UI to work correctly in my detail view. The code for the view I am working on is as follows:</p>
  
  <pre><code>struct JobDetailView : View {
  
      var jobDetails: JobDetails
  
      var body: some View {
  
              Form {
  
                  Section(header: Text("General")) {
                      HStack {
                          Text("Job Name")
                          Spacer()
                          Text(jobDetails.jobName)
                              .multilineTextAlignment(.trailing)
                      }
  
                      HStack {
                          Text("Hourly Rate")
                          Spacer()
                          Text(TextFormatters().currencyString(amount: jobDetails.hourlyRateBasic!))
                              .multilineTextAlignment(.trailing)
                      }
                  }
  
              }   .padding(.top)
                  .navigationBarTitle(Text(jobDetails.jobName))
      }
  }
  
  </code></pre>
  
  <p>The reason for the <code>.padding(.top)</code> is to stop the Form overlapping the navigation bar when scrolling upwards.</p>
  
  <p>The white background on the navigation bar portion my issue (first image), I should expect it to be in keeping with the overall style of the UI, what I expect to happen is shown in the second image.</p>
  
  <p>I have tried to add foreground/background colours and Views to change this colour, but to no avail. I'm also reticent of forcing a colour for the NagivationBar, as this will require further configuration for use with dark mode.</p>
  
  <p><a href="https://i.stack.imgur.com/SfVoj.png" rel="noreferrer">Current view when running application.</a></p>
  
  <p><a href="https://i.stack.imgur.com/5czhx.png" rel="noreferrer">Expected view.</a></p>