title: Set color for all UINavigationBars
body: <p>I have an app with multiple UINavigationControllers. Now I want to set their background color to the same color. I wrote this into the application method of AppDelegate:</p>
  
  <pre><code>UINavigationBar.appearance().backgroundColor = UIColor.darkGray
  </code></pre>
  
  <p>The same statement for UITabBars works:</p>
  
  <pre><code>UITabBar.appearance().barTintColor = UIColor.darkGray
  </code></pre>
  
  <p>What is my mistake?</p>
  
  <p>Thanks for your help!</p>