I read lot's of answers how to hide status bar on iPad in iOS 7.0 but nothing works. My app is an iPhone app only, and it's deployment target is set to 6.0 . On iPhone 6.0 , 7.0 and iPad 6.0 status bar is hidden, but on iPad with iOS 7.0 isn't.
1
votes
5 Answers
0
votes
Try:
Option1:
- (BOOL)prefersStatusBarHidden {
return YES;
}
Use this code in the rootViewController of your app
Option 2:
In info.plist file add a row for "View controller-based status bar appearance" and set it to NO
Option 3:
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
[application setStatusBarStyle:UIStatusBarStyleLightContent];
self.window.clipsToBounds =YES;
self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);
}
0
votes
0
votes
0
votes
I always use this snippet:
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]){
[self prefersStatusBarHidden];
}
else{
// iOS 6
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
}
[self setNeedsStatusBarAppearanceUpdate];
And implement this method:
- (BOOL)prefersStatusBarHidden {
return YES;
}