Comment faire UITabBarController charge les contrôleurs paresseusement?

J'ai un UITabBarController créé programaticaly qui gère les 4 sous-classes de UIViewController. Quelque chose comme:

//Create Controller 1
self.terminal = [[[TerminalController alloc] initWithNibName:@"TerminalView" bundle:nil] autorelease];
UINavigationController* navTerminal = [[[UINavigationController alloc] initWithRootViewController:terminal] autorelease];
navTerminal.title = __(@"Terminal");
navTerminal.navigationBar.barStyle = UIBarStyleBlackOpaque;
navTerminal.tabBarItem.image = [UIImage imageNamed:@"tab_terminal.png"];        
//Create Controller 2
self.history = [[[HistoryController alloc] initWithNibName:@"HistoryView" bundle:nil] autorelease];
UINavigationController* navHistory =  [[[UINavigationController alloc] initWithRootViewController:history] autorelease];
navHistory.title = __(@"History");
navHistory.navigationBar.barStyle = UIBarStyleBlackOpaque;
navHistory.tabBarItem.image = [UIImage imageNamed:@"tab_history.png"];
//Create Controller 3
self.settings = [[[SettingsController alloc] initWithNibName:@"SettingsView" bundle:nil] autorelease];
UINavigationController* navSettings =  [[[UINavigationController alloc] initWithRootViewController:settings] autorelease];
navSettings.title = __(@"Settings");
navSettings.navigationBar.barStyle = UIBarStyleBlackOpaque;
navSettings.tabBarItem.image = [UIImage imageNamed:@"tab_settings.png"];
//Create Controller 4
HelpController* help = [[[HelpController alloc] initWithNibName:@"HelpView" bundle:nil] autorelease];
UINavigationController* navHelp =  [[[UINavigationController alloc] initWithRootViewController:help] autorelease];
navHelp.title = __(@"Help");
navHelp.navigationBar.barStyle = UIBarStyleBlackOpaque;
navHelp.tabBarItem.image = [UIImage imageNamed:@"tab_help.png"];
//Create Tab Bar an add it's view to window.
self.tabBar = [[[UITabBarController alloc] initWithNibName:nil bundle:nil] autorelease];
tabBar.viewControllers = [[[NSArray alloc] initWithObjects:navTerminal, navHistory, navSettings, navHelp, nil] autorelease];
tabBar.delegate = self;     
[window addSubview:tabBar.view];

Est-il un moyen de dire la UITabBarController pour charger la vue des contrôleurs paresseusement? ej, lorsque l'utilisateur clique sur l'un de l'onglet éléments de la barre ou lorsque tabBarController setSelectedIndex est appelé?

InformationsquelleAutor Rafael Vega | 2009-07-28