gpt4 book ai didi

iphone - 发送 -removeAllAnimations 到一个图层也会传播到它的所有子图层吗?

转载 作者:行者123 更新时间:2023-12-03 18:37:51 24 4
gpt4 key购买 nike

我想知道如果我将 -removeAllAnimations 发送到父层,子层动画是否会继续播放。

最佳答案

根据removeAllAnimations的文档:

Remove all animations attached to the receiver.

您需要遍历子图层并从中删除动画:

for (CALayer* layer in [containerLayer sublayers]) {
[layer removeAllAnimations];
}

关于iphone - 发送 -removeAllAnimations 到一个图层也会传播到它的所有子图层吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1180336/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com