i create i navigationController project name:autoload, then create two uiviewContorller named: second,three
i want the process is load rootView the load second in
Instead of calling pushViewController in the viewDidLoad methods, try setting the viewControllers array in the applicationDidFinishLaunching method:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
RootViewController *root = [[RootViewController alloc] init];
root.title = @"root";
Second *second = [[Second alloc] init];
second.title = @"second";
Three *three = [[Three alloc] init];
three.title = @"three";
[navigationController setViewControllers:[NSArray arrayWithObjects:root,second,three,nil] animated:YES];
[root release];
[second release];
[three release];
[window addSubview:[navigationController view]];
[window makeKeyAndVisible];
}