iphone - Why doesn't initWithRootViewController retain the viewController Class that is passed into it? -


I have a custom view controller called the source list ViUI controller, and I am adding it to a UI navigation controller After I have added the sourceListViewController to the window of the iPhone app window, the sourceListViewController, I have released the sourceListViewController. I Bundle: zero]; UINavigationController * Navigation Controller = [[[UINavigationController alloc] initWithRootViewController: sourceListVC] AutoCare]; [SourceListVC Release];

When I do this, the app will crash after the view loads on the phone. When I commented on the last line, then the app did the right thing to keep the copy of the InitWithRootViewController source listView?

You are autoreleasing navigation controllers, so if the navigation controller is autoreled (which may be in the next ringalp Will be) then the source list will be the VC.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -