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

  • Home
  • SEARCH
  • 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 344591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:00:17+00:00 2026-05-12T11:00:17+00:00

I have one like this: CALayer *layer = stripeButton.layer; CAKeyframeAnimation *moveAnim = [CAKeyframeAnimation animationWithKeyPath:@bounds.origin.y];

  • 0

I have one like this:

CALayer *layer = stripeButton.layer;
CAKeyframeAnimation *moveAnim = [CAKeyframeAnimation animationWithKeyPath:@"bounds.origin.y"];
moveAnim.duration = 3.35;
moveAnim.repeatCount = 0;
moveAnim.autoreverses = NO;
moveAnim.removedOnCompletion = NO;
moveAnim.calculationMode = kCAAnimationLinear;
moveAnim.fillMode = kCAFillModeForwards;

// ... keys and values here ...

[theLayer addAnimation:moveAnim forKey:@"theAnimation"];

You see this animation goes 3.35 seconds. In the meantime, it can happen that at i.e. 2 seconds a new animation with the same key @”theAnimation” is kicked off, for different values.

Problem what’s happening: New animation does not pick up the current visible state. It begins hard from scratch. The view jumps to start position in a ugly manner and from there, the new animation begins. For UIView there is an setAnimationsBeginFromCurrentState=YES, but I haven’t found anything like that for CAKeyFrameAnimation. Any idea?

  • 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-12T11:00:18+00:00Added an answer on May 12, 2026 at 11:00 am

    You want to query the layer for its presentation layer, which is its current interpolated state including any animations currently running.

    –

    Excerpt from the CALayer Class Reference:

     -(id)presentationLayer
    

    Returns a copy of the layer containing all properties as they were at the start of the current transaction, with any active animations applied.

    –

    The relationship of the Layer Tree (your data), the Presentation Tree (current interpolation values of your data), and the Render Tree are explained here in the CA programming guide.

    Core Animation Rendering Architecture

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

Sidebar

Related Questions

Ok, I have one JavaScript that creates rows in a table like this: function
I have a simple web service operation like this one: [WebMethod] public string HelloWorld()
I have a Linq to Entities query like this one: var results = from
Let's say you have a text file like this one: http://www.gutenberg.org/files/17921/17921-8.txt Does anyone has
Right now, I have a SQL Query like this one: SELECT X, Y FROM
I have markup like this: <p>one two three four</p> And I want to use
I have an xml file like this: <root> <item> <name>one</name> <status>good</status> </item> <item> <name>two</name>
I have a large table with list of scores like this, one score per
Another easy one hopefully. Let's say I have a collection like this: List<DateTime> allDates;
If I have a button like the one in this image : http://www.freeimagehosting.net/image.php?4cd775814c.png how

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.