Question

When my app returns from background, the UIViewController jumps down the height of the UINavigationBar (44 pixels).

Everything is being controlled through a story board using push segues.

Even when I NSLog the frame of both the view controller and the navigation controller after the "jump", using NSStringFromCGRect, they both show (0,0,320,480) as their frame, even though its clearly not the case.

Before:

enter image description here

After returning from background:

enter image description here

Was it helpful?

Solution

You can use this code for hide navigation bar in YourViewController

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:YES];
    [self.navigationController.navigationBar setHidden:YES];
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top