3
votes

I did this

- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    [[UIApplication sharedApplication] setStatusBarHidden:YES];
}

and it is great in iOS7, but iOS8 have some trouble with transitions in navigation bar between views and says:

Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.

So, is any known solution to that?

1
Originally asked as a comment under this post - AHiggins

1 Answers

1
votes

Try this.

Make sure you have a delegate to the imagepicker.

imagePicker.delegate = self

now define this function

- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    [viewController prefersStatusBarHidden];
    [viewController performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
}