ios - 当 UIView dealloc 仍然留下引用时删除所有当前动画
<p><p>我有一个 UIView 子类,它在 iOS 项目中经常被分配和释放。我添加了 <code>;</code> 以尝试在销毁对象之前删除所有动画。偶尔,我仍然会收到 <code>-: message sent to deallocated instance</code>。现在,不应该删除动画会杀死该委托(delegate)并阻止它尝试调用 animationDidStop 吗? </p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>请看<a href="https://stackoverflow.com/questions/1180336/will-sending-removeallanimations-to-a-layer-also-propagate-to-all-its-sublayers" rel="noreferrer noopener nofollow">"Will sending -removeAllAnimations to a layer also propagate to all it's sublayers?"</a>这可能是您问题的可能答案。</p></p>
<p style="font-size: 20px;">关于ios - 当 UIView dealloc 仍然留下引用时删除所有当前动画,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/5598768/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/5598768/
</a>
</p>
页:
[1]