Error in status bar of UIImagePickerController in iOS8

I did it

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

      

and this is great in iOS7, but iOS8 has some problems with navigation bar transitions between views and says:

Navigation transition completed in an unexpected state. The navigation bar's visibility tree may be damaged.

So, any known solution to this?

+3


source to share


1 answer


Try it.

Make sure you have a delegate for 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)];
}

      

+1


source







All Articles