How do I check whether a CAKeyframeAnimation has already cleared a keyframe or not?

278 Views Asked by At

Greetings,

Let's say, for the sake of simplicity, that I'm animating the position of a UIView using a CAKeyframeAnimation employing a path containing three keyframes, let's call them A, B, an C. At a random time during the animation I want to check whether the animation has already passed the B keyframe.

How do I do that?

1

There are 1 best solutions below

0
On

Well, if case anyone is interested, I solved the problem by calculating and storing outside the CAKeyframeAnimation the delta time from the start the animation will hit every keyframe.