Last active
December 24, 2015 06:48
-
-
Save seikai/6759145 to your computer and use it in GitHub Desktop.
hide statusbar on ios7
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
//viewDidLoad | |
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) { | |
// for iOS 7 | |
[self prefersStatusBarHidden]; | |
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)]; | |
} else { | |
// for under iOS 6 | |
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide]; | |
} | |
//define method | |
- (BOOL)prefersStatusBarHidden | |
{ | |
return YES; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment