I wanted to add a navigation controller to a view based application . how can we do this both programmatically and using xib file..
UINavigationController *navcontroller = [[UINavigationController alloc] initWithRootViewController:viewController];//here viewController is to which you want to make the navigation [self.view addSubView:navController.view];