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 d开发者_开发百科o something with autorelease?
Ton.
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:
[myView addSubview.newSubview];
Once you have done this myView owns the subview and you can release it without hassles.
精彩评论