I want to hide staus bar in single view controller but my code is not working. I\'m using the below code
-(BOOL)prefersStatusBarHidden
{
return YES;
}
if you have View controller-based status bar appearance
set to YES
in app's plist
, put this code in the view controller:
- (BOOL)prefersStatusBarHidden {
return YES;
}
and if View controller-based status bar appearance
is set to NO
, do the following whenever you want to hide the status bar.
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];