Reputation: 909
Hi I have an application but I want to hide the status bar through out the application. Upto ios 6 it works perfectly. But in ios 7 when I open the ImagePicker
then it shows the status bar and remaining throughout the application. It starts to display only after opening image picker.
What is the reason for this and how to solve this problem?
Upvotes: 1
Views: 113
Reputation: 27225
In your app's info.plist
, add a line for View controller-based status bar appearance
which is a Boolean
, and set it to NO
.
Have you tried to write the below code in your -application didFinishLaunchingWithOptions:
?
[[UIApplication sharedApplication] setStatusBarHidden:YES];
Or you can add this method in your View Controller :
- (BOOL)prefersStatusBarHidden {
return YES;
}
Upvotes: 1
Reputation: 3089
in your apps plist file add a row call it "View controller-based status bar appearance
" and set it to NO.
Add method in your view controller.
- (BOOL)prefersStatusBarHidden {
return YES;
}
Upvotes: 2