Note that there are some explanatory texts on larger screens.

plurals
  1. POiphone splash screen multi-tasking
    primarykey
    data
    text
    <p>I have added a fading splash screen to an iPhone with the code below</p> <pre><code>UIImageView *splashView; .. .. .. splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0,20, 320, 460)]; splashView.image = [UIImage imageNamed:@"Default.png"]; [window addSubview:splashView]; [window bringSubviewToFront:splashView]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:2.8]; [UIView setAnimationTransition:UIViewAnimationTransitionNone forView:window cache:YES]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(startupAnimationDone:finished:context:)]; splashView.alpha = 0.0; splashView.frame = CGRectMake(-60, -60, 440, 600); [UIView commitAnimations]; - (void)startupAnimationDone:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context { [splashView removeFromSuperview]; [splashView release]; } </code></pre> <p>This is for an old app that I am now enabling multi-tasking for. I have an issue where if the app is closed (via the home button or locked) I want to cancel the animation. I have added the following code to remove the splash view when the app is closed</p> <pre><code>-(void) applicationDidEnterBackground:(UIApplication *)application [splashView removeFromSuperview]; [splashView release]; } </code></pre> <p>The app crashes if the app is closed before the splash screen animation completes as the splash screen in removed in applicationDidEnterBackground, so when startupAnimationDone gets called (after applicationDidEnterBackground) there is nothing to remove so it crashes.</p> <p>Is there a way to cancel the animation in applicationDidEnterBackground?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload