Core Animation Troubles (Update)

After doing some research on how to approach solving my problem, I think I may have a direction to follow. And I am pretty sure that I now understand what I was doing wrong.

The problem that I was having was that I was trying to use explicit animations for everything, because I wanted to use CAKeyframeAnimation. After reading a couple of email threads[1][2] on Core Animation, I think I may fully understand what needs to be done.

Okay, so here is the explanation. Explicit animations can only be used for properties that are (1) already defined on the CALayer class and (2) are marked in the documentation as animateable. I was trying to use explicit animation for a property that does not meet either of these conditions. Damn.

Okay, so now on to what I need to do. My main goal is to be able to easily chain animations together, or define when an animation should start. Either will work, because if I know how long it takes for an animation to run, then I know when to tell the next animation to start. So, how do I do this without using explicit animations?

That is what I am going to try and figure out next. I just wanted to make sure that I posted this update before I got any responses.



2 Responses to “Core Animation Troubles (Update)”

  1. Lee Falin says:

    Hey, sorry for responding so late I’m sure you have this solved by now, but I was wondering if you knew about CATextLayer or if you were just practicing subclassing for fun and profit.

    CATextLayer does in fact have a foregroundProperty that you can animate.

    If you haven’t already, I would also suggest looking at these two Core Animation sample projects from Scott Stevenson, they are just fun to play with and his coding style is really easy to follow:

    Art Gallery:
    Nano Life:

  2. Lee Falin says:

    Make that a foregroundColor property.

Leave a Reply