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 7909369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:23:02+00:00 2026-06-03T12:23:02+00:00

I have a CABasicAnimation in the viewWillAppear method of viewA. when I press a

  • 0

I have a CABasicAnimation in the viewWillAppear method of “viewA”.
when I press a button in viewA to go to viewB and then go back to viewA
the CABasicAnimation in the viewWillAppear (of viewA) works without problem.

but, when I go from viewA to viewB, and in viewB I resign the application by pressing the home button and return back to the app, the CABasicAnimation in viewWillAppear of viewA doesn’t trigger after I’ve pressed the back button in viewB.

The funny thing is that I also have an animation block in the viewWillAppear and that triggers without any problem in this scenario. so the viewWillAppear method is triggered it’s just the CABasicAnimation that doesn’t work the first time after resigning and entering the app.

- (void) viewWillAppear:(BOOL)animated {

CAMediaTimingFunction *customTimingFunction;
    customTimingFunction=[CAMediaTimingFunction functionWithControlPoints: 0.5f :0.01f :0.1f : 1.f];

    CABasicAnimation *buttonAnimation = [CABasicAnimation animationWithKeyPath:@"transform.translation"];

    buttonAnimation.fromValue=[NSValue valueWithCGPoint:CGPointMake(0,-600)];
    buttonAnimation.toValue=[NSValue valueWithCGPoint:CGPointMake(0,0)];
    buttonAnimation.duration = 1;
    buttonAnimation.removedOnCompletion = NO;
    buttonAnimation.fillMode = kCAFillModeForwards;
    buttonAnimation.timingFunction = customTimingFunction;
    [button.layer addAnimation:buttonAnimation forKey:@"transform.translation"];

}
  • 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-06-03T12:23:07+00:00Added an answer on June 3, 2026 at 12:23 pm

    I’ve found the solution. if I change buttonAnimation.removedOnCompletion = NO; to change buttonAnimation.removedOnCompletion = YES; it will trigger every time. even after resign and entering the app.

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

Sidebar

Related Questions

I've used the code in an IBAction (button press) method: CABasicAnimation *rotateButton; //don't forget
have not tested on windows. but in ubuntu when u disconnect from the network,
I have an UIImageView which I can rotate using CABasicAnimation . That works fine.
Have someone tried out DeCAL in Delphi 2009? I'm thinking about upgrading from 2007,
I have this code to move a view. CABasicAnimation *theAnimation; theAnimation=[CABasicAnimation animationWithKeyPath:@transform.translation.x]; theAnimation.duration=1; theAnimation.repeatCount=1;
I have this View class. It adds subviews to itself and then I want
I have the following code that gets called after the view loads. It works
I have a problem I don't understand regarding UIViews and Core Animation. Here's what
I have a custom UITableView cell which has a button and a label. I
I have an endlessly looping CABasicAnimation of a repeating image tile in my view:

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.