I wanted to start a optimization thread.
I have ran into an interesting situation, I have an iPhone app with 3 UITableViews each displaying more or less the same data (you can say it's a matter of filering). To date I had 3 separate NIBs for this, each with it's own controller, additionaly the UITableViews were inside UINavigationController's for the sake of buttons on top.
Now to optimize the app and reduce it's footprint, I pack all the logic to one common controller (a UITableViewController) and left only one NIB in place. The common controller would take care of filtering the data out, and pointing to the correct data.
So, I load the same common controller to 3 of the navigation controllers:
navControllerA = [[UINavigationController alloc] initWithRootViewController: commonTableController];
and added these navControllers to the UITabBarController:
navigationControllersArray = [NSArray arrayWithObjects: navControllerA, navControllerB, navControllerC, nil];
[tabController setViewControllers:[NSArray arrayWithArray:navigationControllersArray]];
Now all is fine, the tabs display, the table views show up. But once you touch the next UITabBaritem and go back to the previous one the UITableView doesn't show, you can only see a UIWindow in it's place. The UITableView stays visible only for the last touched UITabBarItem.
Is there some kind of UITabBar view loading mechanisinm I'm not aware of?