iOS splash Screen Animation

animation, ios, splash-screen

Solution

You can't animate the splash image, but you can wait until the app is launched and add your own view with an animation.

Problem

In my app I want the splash screen to be animated I'm using the following code but the animation is not working. ``` UIImageView *splashScreen = [[UIImageView alloc] initWithImage:[UIImage imageNamed: @"Default.png"]]; [self.window.rootViewController.view addSubview: splashScreen]; [self.window makeKeyAndVisible]; NSLog(@"begin splash"); [UIView animateWithDuration: 0.2 delay: 0.5 options: UIViewAnimationOptionCurveEaseOut animations: ^{splashScreen.alpha = 0.0; } completion: ^ (BOOL finished) { [splashScreen removeFromSuperview]; NSLog(@"end splash"); } ]; ```

Original source