I wanted the status bar to remain black opaque while showing the photo library picker (the photo picker changes it to black translucent) and this solved the issue for me.
Set the UIImagePickerDelegate:
libraryUI.delegate = self;
Implement the following callback:
- (void)navigationController:(UINavigationController *)navigationController
willShowViewController:(UIViewController *)viewController
animated:(BOOL)animated {
if ([navigationController isKindOfClass:[UIImagePickerController class]] &&
((UIImagePickerController *)navigationController).sourceType == UIImagePickerControllerSourceTypePhotoLibrary) {
[[UIApplication sharedApplication] setStatusBarHidden:NO];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque animated:NO];
}
}
You can specify any kind of status bar style in here. In your case, you would probably have to remove the sourceType check and specify UIStatusBarStyleBlackTranslucent
.