Hi,

When my app starts, I'd like to show a splash screen with a logo, etc, and 
animate it to the main screen after a short delay.

After some searching, I came up with the following at the end of 
application:didFinishLaunchingWithOptions:

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


On the iOS Simulator, I do see the splash, but the animation is choppy. On my 
iPhone I don't see the splash screen at all, just a black screen which goes to 
my main screen after the delay.

Any suggestions what I could be doing wrong?

Thanks,

- Koen.



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to