“正在最终确定的修改层”弹出导航控制器时出错
我正在为我的应用程序使用导航控制器。在其中一个视图中,我有一个由计时器触发的动画。 当我单击返回时,我在控制台中收到此消息:
modifying layer that is being finalized
我认为这是因为动画在释放后仍在运行。我找到了如何删除动画,但在这种情况下不起作用:
[toolbarView.layer removeAllAnimations];
是否有其他方法可以毫无问题地释放此视图控制器?
I'm using navigation controller for my app. In one of views I have an animation that is fired by timer.
When I click back I get this message in console:
modifying layer that is being finalized
I think that it's because animation is still running after dealloc. I found how to remove animations but it's not working in this case:
[toolbarView.layer removeAllAnimations];
Is there a different way to release this viewcontroller without problems?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是由于释放问题造成的。
就我而言,我在方法内分配一个类,并且我将其推送到下一个视图控制器。
之后我释放了该类。所以它显示了该错误。
解决方案....
我在 .h 中初始化并在 dealloc 中释放。现在它工作正常。
That is due to releasing problem.
in my case, i m allocating a class inside the method and that i am pushing to next view controller .
after that i m releasing that class.so it is showing that error.
solution....
i initialized in .h and released in dealloc.now it is working fine.