I have a main view showing with a button that will open a navigation controller:
Then you can navigate within the navigation controller to other views which are pushed on like:
But when you back up out of the navigation it will remove all those views:
But only the dealloc of the rootViewController is getting called. How would I go about removing all the other views that were opened in the navigation?
I would have thought that by clearing out the navigationContoller that would take care of it, but apparently not.
Code:
pView = [[PreferencesViewController alloc] init];
navigationController = [[UINavigationController alloc] initWithRootViewController:pView];
[pView release];
[ window addSubview:[navigationController view] ];
Then you can navigate within the navigation controller to other views which are pushed on like:
Code:
[[self navigationController] pushViewController:subViewController animated:YES];
But when you back up out of the navigation it will remove all those views:
Code:
[[navigationController view] removeFromSuperview];
[navigationController release];
navigationController = nil;
But only the dealloc of the rootViewController is getting called. How would I go about removing all the other views that were opened in the navigation?
I would have thought that by clearing out the navigationContoller that would take care of it, but apparently not.