2

I want my app to not have the status bar at all! I have tried using the .plst

I have tried everything in here Status bar won't disappear and also in here How to prevent iOS 5 from showing the status bar even though UIStatusBarHidden is YES?

Can someone go into extreme detail to help me? I am using XCode 5 if that helps. I just want the status bar to be gone from the app! Thanks!

Community
  • 1
  • 1
Cameron Tarbell
  • 134
  • 3
  • 8

7 Answers7

15

iOS 7

In your Info.plist file add key View controller-based status bar appearance with value NO. And, add key Status bar is initially hidden with value YES.

Community
  • 1
  • 1
LuisEspinoza
  • 8,508
  • 6
  • 35
  • 57
0

To hide the status bar after the app has completely launched, change it programmatically by adding this line to your app delegate's applicationDidFinishLaunching method:

[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];

If you set animated to YES then the status bar will disappear by fading out. One question, why do you want to delete the status bar?

Sam
  • 11
  • 6
0

in your "*project_name*-Info.plist" file, add a key named "Status bar is initially hidden" and then set the value to "YES". that will always hide the status bar.

DoS
  • 1,454
  • 13
  • 18
0
//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;
}
karthika
  • 4,085
  • 3
  • 21
  • 23
0

Have you tried this: click on .xib file -> attribute inspector -> change 'Status Bar' to 'None' (refer attached image) enter image description here

Mumthezir VP
  • 6,251
  • 6
  • 28
  • 57
0

Open your application Info.plist file and add the following lines:

<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIStatusBarHidden</key>
<true/>
Zorayr
  • 23,770
  • 8
  • 136
  • 129
0

Please add this to your view controller

- (BOOL)prefersStatusBarHidden {
    return YES;
}
daveP
  • 11
  • 1