title: View appears 20 pixels below navigation bar
body: <p>When I programmatically create, in the AppDelegate, a UINavigationController, having as root an embedded UITabBarController with for example two simple tabs consisting of standard UIViewControllers, the views of the UIViewControllers appear to be shifted down 20 pixels from the navigation bar, i.e there is a 20 pixels gap between the bottom of the navigation bar and the top of the view.</p>
  
  <p>The code is a dead simple empty application with only the following code in the AppDelegate didFinishLaunchingWithOptions function:</p>
  
  <pre><code>self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  
  UIViewController* vc1 = [[UIViewController alloc] init];
  vc1.view.backgroundColor = [UIColor blueColor];
  
  UIViewController* vc2 = [[UIViewController alloc] init];
  vc2.view.backgroundColor = [UIColor redColor];
  
  UITabBarController* tabBarController = [[UITabBarController alloc] init];
  [tabBarController setViewControllers:[NSArray arrayWithObjects:vc1, vc2, nil]
      animated:YES];
  
  UINavigationController* navigationController = [[UINavigationController alloc]
      initWithRootViewController:tabBarController];
  
  self.window.rootViewController = navigationController;
  [self.window makeKeyAndVisible];
  return YES;
  </code></pre>
  
  <p>The problem seems to be linked to the height of the status bar, however I do not understand what I am doing wrong.
  The problem does not appear in the simulator though, and only seems to appear when running on the device. Also when you select the second tab, then the views seem to be moved back to it's normal position (without a 20 pixels offset from the navigation bar).</p>
  
  <p>Has anybody experienced a similar problem and/or is there something that I am doing wrong?</p>