开发者

Do I need to have an outlet for every inner MVC in MainWindow.xib?

I'm building a Tab Bar app, pretty all GUI modeling is done with IB. So, my MainWindow xib file contains an UITabBarController that is retained by a files owner outlet. All of my Tabs are navigation controllers with view controllers. I have dragged those navigation controllers from the window view in IB, also dragged the starting view controllers for each of that navigation controller.

The questions is do I need to have an outlets for those NavCons and ViewCons in my mainAppDelegate class, in order to do proper memory management and release them in dealloc? If so, why I can't connect them in main xib file because no ou开发者_JAVA百科tlets are shown in popup window. Should note that all those properties have an outlet keyword in front of them.


I'd say no.

Don't they autorelease?

You don't do an explicit alloc in your code therefore you do not have to release them. That's my understanding.

At least I never released the navigation controllers and view controllers on the highest level within the tabs of my tab bar based apps.


You don't require outlet for those navigation and view controller.You only need outlet for tab bar controller.

When you release tab bar controller, it also release controllers inside it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜