13

Hi I have tried the following but am unable to remove the status bar from my application:

  1. Set status bar is initially hidden to YES in plist
  2. 'Hide during application launch' to ticked in Project General settings
  3. Set status bar to 'none' in the interface builder file controlling view controllers
  4. Set [UIApplication sharedApplication].statusBarHidden = YES; in app delegate.

All these used to work fine in the 100 applications I did before but I made a recent xcode upgrade..

Is there some other secret way of getting rid of the status bar in the app? Do I need to journey to Apple headquarters and slay a red dragon ?

Zigglzworth
  • 6,645
  • 9
  • 68
  • 107

2 Answers2

33

Found the solution

In your apps plist file add a row call it "View controller-based status bar appearance" and set it to NO

enter image description here

SOURCE - OPENFL

Himanshu Joshi
  • 3,391
  • 1
  • 19
  • 32
  • 1
    Thank you! worked. I didn't realize that apple added yet another setting controlling status bar.. Perhaps in their next iOS version they can put it in another 17 different settings and win the award for most elaborate setting this century. – Zigglzworth Mar 10 '14 at 11:55
  • Yeah !! Apple is booming... :P – Himanshu Joshi Mar 10 '14 at 11:59
  • @Zigglzworth plz c my answer as well. Sometimes the pList method fails to work (esp: if you are building apps using cordova). You can try my method in appDelegate.m and viewcontrollers.m – madLokesh Mar 10 '14 at 13:29
  • it should contain both. In general tab ofr your app tick two boxes Hide during application launc and Requires full screen. And then also be sure to add what author of this posts says to doo – swift2geek Mar 22 '19 at 10:20
1

viewDidload

if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
    // iOS 7
    [self prefersStatusBarHidden];
    [self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
} else {
    // iOS 6
    [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
}

Add this method

- (BOOL)prefersStatusBarHidden
{
    return YES;
}
Pang
  • 9,564
  • 146
  • 81
  • 122
madLokesh
  • 1,860
  • 23
  • 49