Created
July 24, 2014 08:04
-
-
Save nvkiet/fc465499957c705847f2 to your computer and use it in GitHub Desktop.
Force hide status bar in iOS 6 and iOS 7
This file contains hidden or 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
| //viewDidload | |
| if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) { | |
| [self prefersStatusBarHidden]; | |
| [self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)]; | |
| } else { | |
| [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide]; | |
| } | |
| // Add this Method | |
| - (BOOL)prefersStatusBarHidden | |
| { | |
| return YES; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment