-
-
Save ppave/2608222e3ff34d4f3566430ebd47b27b to your computer and use it in GitHub Desktop.
iPhone splash screen fade out animation
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
// in application:didFinishLaunchingWithOptions: in app delegate | |
// before [window makeKeyAndVisible]; | |
UIImageView *splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0, 320, 480)]; | |
splashView.image = [UIImage imageNamed:@"background.png"]; | |
// after [window makeKeyAndVisible]; | |
splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0, 320, 480)]; | |
splashView.image = [UIImage imageNamed:@"Default.png"]; | |
[window addSubview:splashView]; | |
[window bringSubviewToFront:splashView]; | |
[UIView animateWithDuration:0.5 animations:^{ | |
[splashView setAlpha:0.0]; | |
} completion:^(BOOL finished) { | |
[splashView removeFromSuperview]; | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment