hide status bar iPad iOS 7.0

1.5k views Asked by At

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.

my info.plist

app screen (iPad iOS 7.0)

5

There are 5 answers

4
PCoder123 On

Try these properties in the plist also for iPad 7.0

Status bar is initially hidden = YES

View controller-based status bar appearance = NO

4
Anindya Sengupta On

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
croigsalvador On

Try adding this method to your ViewController , it worked for me

- (BOOL)prefersStatusBarHidden
{
    return YES;
}
0
Vincent On

Try if add this to hide the status bar if you use "View controller-based status bar appearance" to NO.

AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary     *)launchOptions
{
    [application setStatusBarHidden:YES];
    return YES;
}
0
Teo On

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;
}