mday
mday

Reputation: 427

Status Bar not hiding - iOS 7

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.

Upvotes: 2

Views: 1235

Answers (4)

Sahil Mahajan
Sahil Mahajan

Reputation: 3990

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...!!!!

Upvotes: 1

mday
mday

Reputation: 427

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.

Upvotes: 0

Abhinav
Abhinav

Reputation: 38162

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

Upvotes: 2

user474901
user474901

Reputation:

try this method

- (BOOL)prefersStatusBarHidden {
    return YES; }

Upvotes: 1

Related Questions