How to hide iOS status bar

ios7show-hidestatusbar

In my iOS video app status bar is hidden in some view controllers. I have done this using following code.

[[UIApplication sharedApplication] setStatusBarHidden:YES];
  • It works for iOS 5 and iOS 6 , but not in iOS 7.

  • I tried with this in particular view controller,

Eg:

-(BOOL)prefersStatusBarHidden { return YES; }

It works well, but I cant show status bar again in the parent view controller.

Best Answer

You should add this value to plist: "View controller-based status bar appearance" and set it to "NO".

enter image description here