i want to hide status bar hidden in both ios 6.0 and ios 7.0. please can you explain any common method which work in both ios version for ios.
please provide solution :-
thanks.
Update In Plist add these property.
Status bar is initially hidden = YES
View controller-based status bar appearance = NO
Programatically
- (void)viewDidLoad {
[super viewDidLoad];
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)])
{
[self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
}
else
{
// iOS 6
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
} }
// add this too
- (BOOL)prefersStatusBarHidden {
return YES; }