Skip to content

Instantly share code, notes, and snippets.

@siqin
Created September 28, 2012 08:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siqin/3798664 to your computer and use it in GitHub Desktop.
Save siqin/3798664 to your computer and use it in GitHub Desktop.
iOS-App-Launch-Animation
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
UIImageView *splashScreen = [[[UIImageView alloc] initWithFrame:self.window.bounds] autorelease];
splashScreen.image = [UIImage imageNamed:@"Default"];
[self.window addSubview:splashScreen];
[UIView animateWithDuration:1.0 animations:^{
CATransform3D transform = CATransform3DMakeScale(1.5, 1.5, 1.0);
splashScreen.layer.transform = transform;
splashScreen.alpha = 0.0;
} completion:^(BOOL finished) {
[splashScreen removeFromSuperview];
}];
return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment