标签: ios uiview core-animation
我有一个UIView子类,它在iOS项目中经常被分配和解除分配。我添加[self.layer removeAllAnimations];以尝试在销毁对象之前删除所有动画。偶尔,我仍然得到-[ClassName animationDidStop:finished:]: message sent to deallocated instance。现在,不应该删除动画杀死该委托并阻止它试图调用animationDidStop?
[self.layer removeAllAnimations];
-[ClassName animationDidStop:finished:]: message sent to deallocated instance
答案 0 :(得分:3)
请查看"Will sending -removeAllAnimations to a layer also propagate to all it's sublayers?",这可能是您问题的可能答案。