Note that there are some explanatory texts on larger screens.

plurals
  1. POiPhone - displaying NavigationBar on a fullscreen modalView makes it go down with transparent space on top
    text
    copied!<p>I have a ModalView called with :</p> <pre><code> PreferencesController *nextWindow = [[[PreferencesController alloc] initWithNibName:@"Preferences" bundle:nil] autorelease]; nextWindow.wantsFullScreenLayout = YES; UINavigationController* navController = [[[UINavigationController alloc] initWithRootViewController:nextWindow] autorelease]; [self presentModalViewController:navController animated:YES]; </code></pre> <p>It is initialised like this :</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; self.navigationController.navigationBarHidden = YES; self.title = @"Options"; } </code></pre> <p>When I set, on a button click (for test) :</p> <pre><code>- (IBAction)ClickIt:(id)sender { self.navigationController.navigationBarHidden = NO; } </code></pre> <p>Then the navigtion bar is displayed, but then the whole view goes down with a transparent space on the Top of the view, with a size of a status bar. The simulated elements in the xibs for the status bar are set to OFF, as for all the other simulated elements.<br> Due to this space, the bottom content of the view goes out of screen.<br> I tried to force <code>self.wantsFullScreenLayout = YES</code> after having set <code>navigationBarHidden = NO</code> but that does not change anything.</p> <p>For information, if I change viewDidLoad like this :</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; self.navigationController.navigationBarHidden = NO; self.title = @"Options"; } </code></pre> <p>Then the problem is the same without having to click the test button.</p> <p>What could be the problem ?</p>
 

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