Note that there are some explanatory texts on larger screens.

plurals
  1. POIPhone - After dismissing Modal View Controller - gap is left at top of page
    primarykey
    data
    text
    <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>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload