How to hide the status bar programmatically in iOS 7?

Magesh picture Magesh · Sep 28, 2013 · Viewed 31.3k times · Source

In , how can I hide the programmatically? I am using XCode 4.6.1 () and I want to implement this in XCode itself.

Answer

Nicolas Manzini picture Nicolas Manzini · Sep 29, 2013

in iOS7 you should implement in your viewController

- (BOOL)prefersStatusBarHidden {
    return YES;
}