Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3215460
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:10:49+00:00 2026-05-17T15:10:49+00:00

I am running into a problem where a restart of my iPhone app causes

  • 0

I am running into a problem where a restart of my iPhone app causes animations to stop. More specifically, I have the following animation set and running:

CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"path"];
animation.duration = 1.0;
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
animation.repeatCount = 1e100f; // Infinite
animation.autoreverses = YES;
animation.fromValue = animationStartPath;
animation.toValue = animationFinishPath;
[view.layer addAnimation:animation forKey:@"animatePath"];

When I press the home key (iOS 4 so it is still ‘running’ in the background) and then relaunch the program, the animation has stopped. Is there any way to prevent this or easily restart them?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:10:49+00:00Added an answer on May 17, 2026 at 3:10 pm

    There are two methods in your app delegate where you can pass down information to your view controller that is performing the animation.

    - (void)applicationWillResignActive:(UIApplication *)application
    {
      // Make note of whether or not the animation is running.
      // Using NSUserDefaults is probably the simplest
    }
    
    - (void)applicationDidBecomeActive:(UIApplication *)application
    {
      // Check your user default setting to see if the animation
      // was running when the app resigned active and then restart it
    }
    

    Of course this means you’ll need a reference to your view controller that is performing the animation in your app delegate, or you could use notifications to pass the notification along. Anyhow, the bottom line is you’ll have to watch for the app becoming active again and restart the animation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Running into a problem. I have a table defined to hold the values of
I'm running into problem about redirect stdout of multi process. Assuming I have process
I'm running into a problem with trying to set up a Mockery to test
I'm running into a problem when trying to create an ArrayList in Java, but
I'm running into a problem inserting rows from a file with 13,000 rows into
I'm running into a problem when trying to select records from my 2005 MS-SQL
I am running into a problem that just doesn't seem right. I've got a
I'm running into the problem of users being able to submit data with '
I'm running into this problem when trying to call a SOAP Web Service from
My company is running into a problem with a web service that is written

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.