I want to add navigation controller to view controller which is the rootviewcontroller of the window. Two xib files main window.xib and view controller.xib files.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
tried this
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
self.window.rootViewController = self.viewController;
self.navController = [[UINavigationController alloc] initWithRootViewController:self.viewController];
[self.window addSubview:self.navController.view];
[self.window makeKeyAndVisible];
return YES;
}
but not working i think as there are two xib files involved.