Hello,
I have something like that :
Code:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
tabBarController = [[UITabBarController alloc] init];
tutoViewController = [[TutoViewController alloc] init];
UINavigationController *tableNavController = [[[UINavigationController alloc] initWithRootViewController:tutoViewController] autorelease];
[tutoViewController release];
[tableNavController setNavigationBarHidden:TRUE];
newsViewController = [[NewsViewController alloc] init];
UINavigationController *table2NavController = [[[UINavigationController alloc] initWithRootViewController:newsViewController] autorelease];
[newsViewController release];
[table2NavController setNavigationBarHidden:TRUE];
forumViewController = [[ForumViewController alloc] init];
UINavigationController *table3NavController = [[[UINavigationController alloc] initWithRootViewController:forumViewController] autorelease];
[forumViewController release];
[table3NavController setNavigationBarHidden:TRUE];
infoViewController = [[InfoViewController alloc] init];
UINavigationController *table4NavController = [[[UINavigationController alloc] initWithRootViewController:infoViewController] autorelease];
table4NavController.title = @"iPuP";
[infoViewController release];
[table4NavController setNavigationBarHidden:TRUE];
tabBarController.viewControllers = [NSArray arrayWithObjects:tableNavController, table2NavController, table3NavController, table4NavController, nil];
[window addSubview:tabBarController.view]; // adds the tab bar's view property to the window
[window makeKeyAndVisible]; // makes the window visible
}
I want to preload views (initialized into the awakeFromNib method) into my app delegate.
Tried something like :
Code:
tutoViewController = [[TutoViewController alloc] init];
[tutoViewController.view awakeFromNib];
UINavigationController *tableNavController = [[[UINavigationController alloc] initWithRootViewController:tutoViewController] autorelease];
[tutoViewController release];
[tableNavController setNavigationBarHidden:TRUE];
But it doesn't works. How could I make that ?
Thanks.