将-removeAllAnimations发送到一个层也会传播到它的所有子层吗? [英] Will sending -removeAllAnimations to a layer also propagate to all it's sublayers?
本文介绍了将-removeAllAnimations发送到一个层也会传播到它的所有子层吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道如果我将-removeAllAnimations发送到父图层,子图层动画是否会继续播放。
I wonder if sublayer animations would continue to play if I send -removeAllAnimations to a parent layer.
推荐答案
按照 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];
}
这篇关于将-removeAllAnimations发送到一个层也会传播到它的所有子层吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文