2

I have used to the below methods to hide the status bar.

Set .plist configuration for hiding status bar and added below method

- (BOOL)prefersStatusBarHidden 
{
    return YES;
}

But in iOS 7.1 update, the status bar not hides while running the app. Does any one have a solution for this ?

Issue exist with iPhone app while running on iPad

Manu Antony
  • 173
  • 1
  • 15
  • This has been asked hundreds of times please do some research before asking. Voted to close. – Popeye Mar 24 '14 at 11:27
  • @Popeye : I have seen this kind of questions many times.But couldn't found any solution for this. The below link is the same what I am experiencing. Kindly have a look into this and suggest a solution for this. http://stackoverflow.com/questions/22452638/status-bar-visible-on-ipad-mini-despite-setting-uiviewcontrollerbasedstatusbarap – Manu Antony Mar 26 '14 at 04:06
  • Well if that's the same as what you are experiencing then it is also a duplicate of that question. – Popeye Mar 26 '14 at 08:04
  • 1
    Am seeking solutions, not just the questions. – Manu Antony Mar 27 '14 at 11:18

2 Answers2

-1

Add the following to your Info.plist:

-(BOOL)prefersStatusBarHidden
{
return YES;
}
Fazil
  • 1,390
  • 2
  • 13
  • 26
-2

Add this method in your code

-(void)hideStatusBar
{
    if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)])
    {
        [self prefersStatusBarHidden];
        [self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
    }
}


- (BOOL)prefersStatusBarHidden
{
   return YES;
}

In your viewDidLoad call this method

- (void)viewDidLoad
{
    [self hideStatusBar];
}
Indrajeet
  • 5,490
  • 2
  • 28
  • 43