0
votes

In my application in ios8 status bar is hiding.But in iOS7 displaying the status bar. I have added the "Status bar is initially hidden = YES View controller-based status bar appearance = NO " and

[[UIApplication sharedApplication] setStatusBarHidden:YES
                                        withAnimation:UIStatusBarAnimationFade];

But getting the status bar.

2
- (BOOL)prefersStatusBarHidden { return YES; } add this methodkb920
have you write your code in viewWillappear?kb920
possible duplicate of How to hide iOS 7 status barDiscoveryOV
yes ,Written the code in viewwillAppear onlyPavani

2 Answers

0
votes

Try it [[UIApplication sharedApplication] setStatusBarHidden:YES];

I think it okey with iOS 7.

0
votes
  • (BOOL)prefersStatusBarHidden { return YES; }

I have implemented this method in each controller.Now status bar is not displaying in ios7.

Thanks for help.