Objective C,UITabBar EXC_BAD_ACCESS
我有 UITabBar,它有 5 个菜单。第三个菜单从我的网络服务器下载图像并在 UIImageView 中显示该图像。
问题是,每当我在下载图像后尝试返回第一个菜单时,它就会爆炸......堆栈跟踪看起来像这样
obj_msgSend
??
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(Hierarchy) _postMovedFromSuperView:]
如果我注释从服务器获取图像的代码,那么它就可以正常工作...... 这里可能有什么问题?
I have UITabBar which has 5 menus. Third menu downloads an image from my web server and shows the image in the UIImageView.
The problem is that whenever if I try to go back to the first menu after download the image then it blows up...The stack trace looks like this
obj_msgSend
??
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(internal) _didMoveFromWindow:toWindow:]
-[UIView(Hierarchy) _postMovedFromSuperView:]
If I comment the code that gets the image from server out then it works fine..
What might be the problem here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,尝试发布下载导致崩溃的图像的代码。 EXEC_BAD_ACCESS 通常在您尝试访问已释放的变量时发生。
Hmm, try to post code for downloading image that creates crash. EXEC_BAD_ACCESS happens usually when you try accessing variable that you have already released.