1

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)

Igor Prusyazhnyuk
  • 133
  • 2
  • 14
  • 29
  • possible duplicate of [Status bar won't disappear](http://stackoverflow.com/questions/17763719/status-bar-wont-disappear) – alexandresoli Mar 18 '14 at 00:27

5 Answers5

0

Try these properties in the plist also for iPad 7.0

Status bar is initially hidden = YES

View controller-based status bar appearance = NO

PCoder123
  • 364
  • 2
  • 11
0

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);
    }
Anindya Sengupta
  • 2,539
  • 2
  • 21
  • 27
0

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;
}
Vincent
  • 1,386
  • 9
  • 9
0

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;
}
Teo
  • 125
  • 1
  • 11
-1

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

- (BOOL)prefersStatusBarHidden
{
    return YES;
}
croigsalvador
  • 1,993
  • 2
  • 24
  • 47