views:

99

answers:

1

I find a problem is that when I use UITabBarController , each time viewController have to be define in the property 'viewControllers', this cause coder can not free the unused viewcontroller in freely, I meaning is that when shift to second tab view then I want free the first tab view immediately , but now , I can not do this action......

any one have good solutions ?

thanks for your answer and time...

A: 

What do you mean with " want free the first tab view immediately"?

muccy
Hi, sorry , I meaning is that when user choice second tab view item then I want free the first tab view by myself, because I do not want the first tab view occupy the memory ..... does it clearly ? thanks for your time....
Robin
But you should not care about that in my opinion if you correctly implement didReceiveMemoryWarning....or are you experiencing those kinds of problem during your testing on you iPhone?
muccy
no.... I think that is not good way to handle the memory issue in the method didReceiveMemoryWarning.... yes, I made app like that tabbar , but not tabController , I think the tabController should like the UITableViewDelegate that provide a method likes '- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section ' in this way , when user choice a tabbar item , coder can return a custome UIViewController in dynamic but fixed ......... my thought is above , does it stupid ? :D
Robin
Not stupid... but I think that it is correct the way it is implemented now because tab bar controller does load view controllers (with complex and nested views) that are not reusable like cells :)
muccy