I see people are having problems with hiding the status bar in iOS 7.1, but I have the opposite problem. I'm unable to unhide once it has been hidden. :)
This piece of the code works perfectly fine on both iOS 7 and 7.1. It will hide the status bar and show the image picker.
if (sourceType == UIImagePickerControllerSourceTypeCamera)
{
imagePickerController.showsCameraControls = YES;
if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) {
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
}
}
self.imagePickerController = imagePickerController;
[self presentViewController:imagePickerController animated:YES completion:nil];
However, the part that is supposed to bring the status bar back doesn't work any more in iOS 7.1:
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationSlide];
[self dismissViewControllerAnimated:YES completion:NULL];
This code will dismiss the image picker, but the status bar will remain hidden.
Any ideas how to solve this issue?