Stop animation on sublayer.

When applying an animation to a layer with a sublayer, how do you prevent the sublayer from inheriting the animation?


I've tried .removeAllAnimations on the sublayer, both after adding the animation and in the animationDidStart() delegate.

I think it has something to do wih the layer being copied when the animation is applied, but still can't figure out a solution.

Sublayers don't inherit animations from their parent. More than likely you are animating something that affects the entire layer tree (such as transform or opacity and the like). There is no way to prevent these from affecting sublayers because thats part of the rendering model.

Stop animation on sublayer.
 
 
Q