Nice transition from splash screen to main application screen using fade out and zoom in animation
Change the -application:didFinishLaunchingWithOptions:
method of your application delegate class like this (assuming your splash image is named Default.png
):
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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
// Put necessary initialization steps here... | |
// Add imageView overlay with fade out and zoom in animation | |
UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.window.frame]; | |
imageView.image = [UIImage imageNamed:@"Default"]; // assuming your splash image is "Default.png" or "Default@2x.png" | |
[self.window addSubview:imageView]; | |
[self.window bringSubviewToFront:imageView]; | |
[UIView transitionWithView:self.window | |
duration:0.75f | |
options:UIViewAnimationOptionTransitionNone | |
animations:^(void){ | |
imageView.alpha = 0.0f; | |
imageView.frame = CGRectInset(imageView.frame, -100.0f, -100.0f); | |
} | |
completion:^(BOOL finished){ | |
[imageView removeFromSuperview]; | |
}]; | |
[imageView release]; | |
[self.window makeKeyAndVisible]; | |
return YES; | |
} |