Created
June 10, 2016 12:06
-
-
Save tinkertims/3ea0bf7d2f677a723cb7aaa5c9e333c2 to your computer and use it in GitHub Desktop.
Hide status bar programmatically with animation
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)hideStatusbar{ | |
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade]; | |
[UIView beginAnimations:@"Statusbar hide" context:nil]; | |
[UIView setAnimationDuration:0.5]; | |
[self.view setFrame:CGRectMake(0, 0, 320, 480)]; | |
[UIView commitAnimations]; | |
} | |
- (void)viewDidLoad { | |
[super viewDidLoad]; // hideStatusbar called after 2 seconds | |
[self performSelector:@selector(hideStatusbar) withObject:nil | |
afterDelay:2.0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just assume I got all of them from here: https://jayprakashdubey.blogspot.in/