I had a problem where I had a series of overlapping CATransition / CAAnimation sequences, all of which I needed to perform custom operations when the animations stopped, but
To make explicit what's implied from above (and what brought me here after a few wasted hours): don't expect to see the original animation object that you allocated passed back to you by
- (void)animationDidStop:(CAAnimation*)animation finished:(BOOL)flag
when the animation finishes, because [CALayer addAnimation:forKey:] makes a copy of your animation.
What you can rely on, is that the keyed values you gave to your animation object are still there with equivalent value (but not necessarily pointer equivalence) in the replica animation object passed with the animationDidStop:finished: message. As mentioned above, use KVC and you get ample scope to store and retrieve state.