In this tutorial, I will show you how to hide status bar and apply animation on it, In your AppDelegate.m file attach the code. See the code below.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[self hideStatusBar];
return YES;
}
- (void)hideStatusBar{
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
[UIView beginAnimations:@"Statusbar hide" context:nil];
[UIView setAnimationDuration:0.5];
[self.view setFrame:CGRectMake(0, 0, 320, 480)];
[UIView commitAnimations];
}
That's it. Happy Coding.
No comments:
Post a Comment