Thanks for this suggestion. I tried:
Code:
NSLog(@"tabBar retainCount before removeFromSuperview = %d", [self.tabBarController retainCount]);
[self.tabBarController.view removeFromSuperview];
NSLog(@"tabBar retainCount after removeFromSuperview = %d", [self.tabBarController retainCount]);
[self.tabBarController release];
which results in the output:
Quote:
tabBar retainCount before removeFromSuperview = 1
tabBar retainCount after removeFromSuperview = 1
Program received signal: “EXC_BAD_ACCESS”.
|
:-(
I could live with having the tab bar controller in the background all the time but I would like to remove the view controllers at least so that quite some objects get deallocated.
Code:
self.tabBarController.viewController = nil;
This also results in a EXC_BAD_ACCESS... I thought it is possible to remove the view controllers at runtime!?
I was searching the web for any example in which a UITabBarController is removed from the super view. Even the Apple UICatalogue example seems to avoid the tab bar controller.