title: IPhone - After dismissing Modal View Controller - gap is left at top of page
body: <p>When starting the app, if the user doesn't have login information stored, I want to display a modal view controller to force the entry of this information.  I found through trial and error, that this had to occur in viewDidAppear of my root view controller.  I tried to put it in viewDidLoad and viewWillAppear, but those didn't work unless I assigned the view of the root view controller to the view of the navigation controller used in the modal which then caused other issues...</p>
  
  <p>So I have:</p>
  
  <pre><code>- (void)viewDidAppear:(BOOL)animated
  {
       NewAccountViewController *newAccountViewController = [[[NewAccountViewController alloc] initWithNibName:@"NewAccountViewController" bundle:nil] autorelease];
  
       UINavigationController *accountNavigationController = [[UINavigationController alloc] initWithRootViewController:newAccountViewController];
    [self presentModalViewController:accountNavigationController animated:YES];       
  }
  </code></pre>
  
  <p>And in the newAccountViewController I have a simple navigation item button that dismisses the modal view controller with dismissModalViewController.</p>
  
  <p>This all works and when the modal is dismissed a view in a navigation controller is visible with its navigation item title at the top....</p>
  
  <p>But there is a white gap about the same size as the status bar between the status bar and the top of the blue navigation item bar.  If I don't do the modal, then the gap is never there.  It only occurs after the modal is presented and dismissed.  I've tried doing animated:NO on both the present and dismissModalViewController.  I've also tried not using the navigation controller in the modal, and that did nothing as well.  Any ideas would be great!  Thanks.</p>