I'm trying to use an UISwitch to toggle the status bar (Xcode 5, iOS 7). I currently have this code
- (BOOL)prefersStatusBarHidden
{
return YES;
}
This hides the status bar completely. but I want to both hide and show the status bar with an UISwitch or with a button click. How can I do it ?
I think returning a boolean value (YES or NO) to prefrersStatusBarHidden will do the job. But I couldn't find any guide about returning values to BOOL.