如何从内存中删除子视图并立即显示? [英] How to remove a subview from memory and display right away?
本文介绍了如何从内存中删除子视图并立即显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从内存中删除UIImageView的子视图(在这种情况下为View Controller)并立即显示?
How do I remove a UIImageView's subview (a View Controller in this case) from memory and display immediately?
[myGroovySubview release];
没有这样做.
任何帮助表示赞赏!
谢谢//:)
推荐答案
myGroovySubview.hidden = YES;
隐藏该视图.您也可以尝试使用[myGroovySubview removeFromSuperview];
myGroovySubview.hidden = YES;
hides the view. You could also try to remove it from its superview with [myGroovySubview removeFromSuperview];
如果将其从其超级视图中删除,由于调用后引用计数应为零,因此release
调用应自动将其从内存中删除.
If you removed it from its superview, the release
call should automatically remove it from memory since the reference count should be zero after that call.
这篇关于如何从内存中删除子视图并立即显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文