7

I have used the two methods to remove the status bar ( the one with the time and the signal strength )but it keeps reappearing in my app for IOS 7

I have used the ' hide during application launch ' in GENERAL SETTINGS

I have added the ' status bar is initially hidden' BOOL to YES

I have changed the status bar to NONE in every View Controller


The problem occurs when i return after having accessed the IPHONE photo library to import a picture into my APP , and only then , it seems to override any previous entries in the PLIST

Does anyone have any code to permanently disable this status bar so it does not appear?

Thanks

* I have tried all the options listed but still when my app returns from opening and selecting from the photo gallery the status bar re-appears *

clive dancey
  • 143
  • 11
  • You have to hide the status bar programmatically in your coding when u come back to your application from photo picker. – CoolMonster Feb 04 '14 at 07:29
  • Did you search before asking ? http://stackoverflow.com/questions/8975869/ios-storyboard-disable-status-bar-on-storyboard-once/20594717#20594717 – Jan Misker Feb 04 '14 at 07:46
  • yes Jan, I did search and so have implemented the changes above , but it was strange as it only re-occurs after I have accessed the photo library..if I don't access that the app is fine. – clive dancey Feb 04 '14 at 10:42

3 Answers3

7

You need implement 2 steps for to hide status bar accross your app:

1) didFinishLaunchingWithOptions

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.

    [[UIApplication sharedApplication]setStatusBarHidden:YES];

    .......

}

2) And .plist file of your project Set this parameter in .plist file

rdurand
  • 7,342
  • 3
  • 39
  • 72
bhavya kothari
  • 7,484
  • 4
  • 27
  • 53
  • Just used the [[UIApplication sharedApplication]setStatusBarHidden:YES]; after the app had chosen images from the library. Seems it was inheriting the view from the photo gallery..thanks bhavya for putting me on the right track. – clive dancey Feb 04 '14 at 19:24
1

Add method in your view controller implementation.

- (BOOL)prefersStatusBarHidden {
    return YES;
}
Nookaraju
  • 1,668
  • 13
  • 24
1

You can get rid of this by adding an entry in the .plist file of your project "View controller-based status bar appearance" set its boolean value to "NO"

creative_rd
  • 695
  • 6
  • 13