I have a ModalView called with :
PreferencesController *nextWindow = [[[PreferencesController alloc] initWithNibName:@"Preferences" bundle:nil] autorelease];
nextWindow.wantsFullScreenLayout = YES;
UINavigationController* navController = [[[UINavigationController alloc] initWithRootViewController:nextWindow] autorelease];
[self presentModalViewController:navController animated:YES];
It is initialised like this :
- (void)viewDidLoad
{
[super viewDidLoad];
self.navigationController.navigationBarHidden = YES;
self.title = @"Options";
}
When I set, on a button click (for test) :
- (IBAction)ClickIt:(id)sender {
self.navigationController.navigationBarHidden = NO;
}
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.
Due to this space, the bottom content of the view goes out of screen.
I tried to force self.wantsFullScreenLayout = YES
after having set navigationBarHidden = NO
but that does not change anything.
For information, if I change viewDidLoad like this :
- (void)viewDidLoad
{
[super viewDidLoad];
self.navigationController.navigationBarHidden = NO;
self.title = @"Options";
}
Then the problem is the same without having to click the test button.
What could be the problem ?