How should I go about creating a NavigationController for use in a view-based application?
A:
Put this code
In delegate .h class
MyViewController *viewController;
In delegate .m class
- (void)applicationDidFinishLaunching:(UIApplication *)application {
UINavigationController *nvcontrol =[[UINavigationController alloc] initWithRootViewController:viewController];
[window addSubview:nvcontrol.view];
[window makeKeyAndVisible];
}
Here "MyViewController" should be replaced by your viewcontroller.
All The Best.
Warrior
2010-03-30 14:34:17