Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will sending -removeAllAnimations to a layer also propagate to all it's sublayers?

I wonder if sublayer animations would continue to play if I send -removeAllAnimations to a parent layer.

like image 570
Thanks Avatar asked Jul 24 '09 21:07

Thanks


1 Answers

As per the documentation for removeAllAnimations:

Remove all animations attached to the receiver.

You'll need to iterate through the sublayers and remove animations from them as well:

for (CALayer* layer in [containerLayer sublayers]) {
  [layer removeAllAnimations];
}
like image 175
Nathan de Vries Avatar answered Sep 23 '22 04:09

Nathan de Vries