Can\'t hide status bar on view controller on ios 7 device.
Already tried setting through plist file and also in Appcontroll
For iPad (iOS 7.0) need to put another value at Info.plist file.
UIStatusBarHidden boolean value YES.
That's because iOS 7 has changed the way it deals with the status bar.
Setting UIViewControllerBasedStatusBarAppearance
to NO
on your app Info.plist should work.
Go to info.plist and add two attributes if not present. set "Status bar is initially hidden" to YES
and set UIViewControllerBasedStatusBarAppearance
to NO
. This will hide status bar for your app.
I had the same issue recently. Be sure that you are targeting the correct view controller. Try to hide the status bar in the root view controller. Also, I´m implementing the method (BOOL)prefersStatusBarHidden
(doc) in my UIViewControllers to hide the status bar. By using this method, you can forward the preferred configuration to a "child view controller". Also, this method works fine in UIViewControllers presented as modal.
// for ios 7
- (BOOL)prefersStatusBarHidden
{
return YES;
}
// for ios 6
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[[UIApplication sharedApplication] setStatusBarHidden:YES];
}