My iPhone app requires that the status bar be hidden at all times. This is generally easy to do, and it works if I only run the app on an iPhone. However, if I run the app on an iPad, the status bar still appears at the top of the content. So, how do I make sure the status bar is hidden no matter device my iPhone-only app is running on? I'm currently doing the following in my code:
Calling this method for each view controller(I actually created a category on UIViewController that implements this automatically for any VC, but it's basically the same as writing it in each vc file):
-(BOOL)prefersStatusBarHidden{
return YES;
}
I also set "status bar is initially hidden" to YES and "View controller-based status bar appearance" to NO in Info.plist. I've also tried detecting which device is being used and calling
[UIApplication sharedApplication]setSetStatusBarHidden:YES]
in the AppDelegate, but no luck there either. So, I believe I've tried just about everything that one would think to try.
It seems this was introduced into iOS 7.1 and affects non-retina iPads running iPhone applications with retina graphics.
Problem devices: iPad 2 iPad Mini (non-retina).
Problem does not exist in iOS 7.0 and status bar issues can be fixed for 7.0 with the other solutions posted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With