I'm using UIViewControllerBasedStatusBarAppearance
and preferredStatusBarStyle
to manage the status bar color and appearance.
My app lets the user choose a photo from his camera roll and crop it to square using the native crop option of UIImagePickerController
.
So I push a UIImagePickerController
and enable editing to get the crop screen.
The problem is, I want that for the albums and photos view, the status bar will be white, and for the crop view I want to hide the status bar.
how can I do that with preferredStatusBarStyle
?
until now I made a category for UIImagePickerController
and implemented:
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleLightContent;
}
this indeed set the status bar to white color in photos, but when going to crop view, the status bar becomes black, that could be good for me because I want to hide it and the background is black so you can't see it, BUT the battery indicator is green! so you only see the battery indicator in the status bar!
how can I solve that? how can I hide the status bar only in the crop view?