iPhone基本发布问题
当我添加新的子视图时,我无法在显示后立即释放控制器。我应该如何释放这个viewController?
我正在考虑使用 viewController 的属性,并使用委托来通知删除视图并释放它?
这是最好的方法吗?或者我应该对自动释放做些什么?
吨。
When i add a new subview, i cant immediately release the controller after displaying. How should i release this viewController?
I was thinking about using a property for the viewController, and use delegation to notify for removing the view and releasing it?
Is this the best way to do it? or should i do something with autorelease?
Ton.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将尝试回答这个相当模糊的问题。我认为你正在做的是创建一个新的子视图然后释放它。您需要做的是将其添加到您的主视图中。就像这样:
一旦你完成了这个,myView就拥有了子视图,你可以毫不费力地释放它。
I'm going to have a shot at answering this rather vague question. I think what you are doing is creating a new subview and then releasing it. What you need to do is add it to your main view. Something like:
Once you have done this myView owns the subview and you can release it without hassles.