2
votes

I recently made a change to my project (Adding SWRevealController and Removing my TabbarController), and all of a sudden my status bar won't hide.

I have tried the following solutions:

  1. Hiding via IB Hiding in my base view controller using

    (BOOL)prefersStatusBarHidden 
    
  2. Hiding using this code in viewdidload.

    [self prefersStatusBarHidden]; 
    [self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)]; 
    
  3. Adding View controller-based status bar appearance set to NO to the plist file.
4
You want to hide the status bar in whole project or only in some view controllers?Sahil Mahajan
I wanted it hidden in the whole project.mday

4 Answers

2
votes

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

1
votes

try this method

- (BOOL)prefersStatusBarHidden {
    return YES; }
1
votes

You can hide the status bar in your project General Settings.

Click on YourApplication Target. Click on General Tab.

select Hide During Application Launch option in Deployment Info Section.

I am adding a screenShot for your convenience.

enter image description here

Your Project provide itself the option of hiding the status bar so why to add the same property in the .plist file.

Enjoy Coding...!!!!

0
votes

I am not 100% convinced, but the problem seemed to resolve when I added "Status bar is initially hidden" = YES to my PLIST file. I don't understand why, but it seems to have done the trick.