title: iOS Status Bar changing color to match navigation bar on its own
body: <p>I have a UINavigationController in my AppDelegate with a RootViewController that has a UITableView. On startup, the status bar changes its color to the color of the navigation bar. When I colored my navigation bar to orange, this is what the status bar is looking like:</p>
  
  <p><img src="https://i.stack.imgur.com/fPd32.png" alt="enter image description here"></p>
  
  <p>It seems that my navigation bar is shifted to the top a little bit. It appears that the navigation controller does not recognize the status bar. How can I fix this issue?</p>
  
  <p>The only thing I have in my app is an AppDelegate and an empty RootViewController. My <code>application:didFinishLaunchingWithOptions</code> is:</p>
  
  <pre><code>self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  RootViewController *rootViewController = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil];
  UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController];
  [navigationController.navigationBar setTintColor:[UIColor orangeColor]];
  self.window.rootViewController = navigationController;
  [self.window makeKeyAndVisible];
  return YES;
  </code></pre>
  
  <p>My IB file for RootViewController just has an empty view. </p>
  
  <p>Nothing unusual. I'm pretty experienced with iOS and that's how I've been doing it every single time. I have no idea what is different this time.</p>
  
  <p>Could someone please advise me? Thanks</p>