Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 11-13-2009, 06:09 AM   #1 (permalink)
Slum
Registered Member
 
Join Date: Jun 2009
Posts: 9
Slum is on a distinguished road
Default Call awakeFromNib from Controller / App delegate

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.
Slum is offline   Reply With Quote
 

» Advertisements
» Online Users: 566
18 members and 548 guests
.Snipe, djbrooks111, djohnson, Domele, gordo26, HemiMG, iGamesDev, mediaspree, ndhieuvn212, nguyenhieu129, stevenkik, SuperDietGenius, Techgirl-52, tjfallon, tknp, Touchmint
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,320
Threads: 93,989
Posts: 402,413
Top Poster: BrianSlick (7,978)
Welcome to our newest member, JessaWilson
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:54 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.