For CAKeyframeAnimation, there are delegates for animation start and animation stop. But I want to call a method in each time frame (to update some subview information on-the-fly). Is there any way I can do it?
For CAKeyframeAnimation, there are delegates for animation start and animation stop. But I want
Share
I do not believe there is any way to do this. The closest you can come is running a timer with a very short period that queries the currently-visible layer properties by calling
-presentationLayeron the layer and querying the result. However this is not guaranteed to match precisely with what’s on-screen, as it effectively generates a copy of the model layer with the animations applied to the current time rather than querying the actual presentation layer used internally.