Monday, February 3, 2014

Hide Status Bar

Web Hosting


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];
}


Web Hosting


That's it. Happy Coding.

No comments:

Post a Comment