title: UINavigationController has extra status bar gap at top
body: <p>This looked simple enough when I set it up, but I can't explain why this gap is present between the status bar and the navigation bar. Also, the contained view looks like it may be properly aligned, and it's just the nav bar that is shifted down. The gap looks like the size of the status bar, so I expect that has something to do with it, but I don't know what.</p>
  
  <p><img src="https://i.stack.imgur.com/0hRn6.png" alt="Nav Bar with extra space"></p>
  
  <p>Here is the code for setting up the navigation controller:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
  
      advancedVC = [[AdvancedSearchFormVC alloc] initWithNibName:@"AdvancedSearchForm" bundle:nil];
      UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:advancedVC];
      nav.navigationBar.tintColor = [UIColor defaultNavBarTint];
      nav.navigationBar.topItem.title = NSLocalizedString(@"SearchTitle", nil);
      UIBarButtonItem *searchButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"SearchButton", nil) style:UIBarButtonItemStylePlain target:self action:@selector(refreshPropertyList:)];          
      nav.navigationBar.topItem.rightBarButtonItem = searchButton;
  
      self.view = nav.view;
  }
  </code></pre>
  
  <p>The rootViewController uses a view from a xib file, where I have simulated the status bar, the navigation bar, and the tab bar. </p>