I am trying to find a way to determine if a view is animating.
Example: I applied a shadow on a view layer, specifying shadowPath for performance. When the image size changes, the shadow should be animated. I can observe the view frame and change the shadowPath of the layer accordingly. But when resizing the view, the shadow jumps forward because the change is not animated.
I know how to animate shadowPath with CABasicAnimation, but I need to know the properties of the current animation so that I can apply them to my animation (mainly: duration, easing).
This is a component of the structure, so I just cannot assume that I know the properties of duration and attenuation in advance.
Is there a way to detect start / run animations when watching a frame?
source share