Reputation: 1647
I've been working recently on some animations and it struck me that there is no delegate method of CAAnimation that updates animation progress. I've tried to use a timer and request a transform from a view being transformed (rotated by z axis) but it always returns the same transform.
Is there any way to get the values being updated by CAAnimation?
Upvotes: 1
Views: 1086
Reputation: 44633
If you want the details of the current state of the animation of a layer, query [layer presentationLayer]
. You can access the transform
property within that object.
Upvotes: 7
Reputation: 2297
Unfortunately, no. However, core animation is time based, so you can always mimic it independently. Also, if you are looking for some discrete precise moments, you can split your animation into a chain and update your state within the animationDidStop
callback.
Upvotes: 0