title: UINavigationController change navigation bar tint color globally and programmatically
body: <p>This code can change color of a <code>UINavigationBar</code> everywhere within the application. However, I noticed that <strong>it does not change the <code>UIColor</code> of the <code>UINavigationBar</code> used by</strong> <code>UINavigationController</code> (mine comes from a <code>UIStoryboard</code>).</p>
  
  <pre><code>UIColor* navBarColor = [UIColor colorWithRed:arc4random()%100/100.0 
                                         green:arc4random()%100/100.0 
                                          blue:arc4random()%100/100.0 
                                         alpha:1];
  [[UINavigationBar appearance] setTintColor:navBarColor];
  
  [[UINavigationBar appearance] setBarStyle:UIBarStyleBlackTranslucent];
  [[UINavigationBar appearance] setAlpha:0.7];
  </code></pre>
  
  <p><strong>Is there a way to access the <code>appearance</code> object of a <code>UINavigationController's</code> navigation bar?</strong> I know how to set tints of individual controllers, but I want to have a global control over how they look. </p>
  
  <p>Update:
  This was my mistake, the code does change the <code>UIColor</code> of all <code>UINavigationBars</code>, but it requires the root navigation controller to be covered and uncovered(for example presenting a modal view controller), then it will re-draw itself with new <code>UIColors</code>! </p>
  
  <p>Thank you!</p>