views:

130

answers:

2

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