-
-
Save CocoaRush/6361233 to your computer and use it in GitHub Desktop.
hide status bar on iOS 7, add this snippet on the root view controller.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view from its nib. | |
if ([self respondsToSelector:SELE(setNeedsStatusBarAppearanceUpdate)]) { //iOS 7 | |
[self setNeedsStatusBarAppearanceUpdate]; | |
} else { | |
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade]; | |
} | |
} | |
// overwrite this Method | |
- (BOOL)prefersStatusBarHidden | |
{ | |
return YES; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment