I\'m using Xcode 4.6.1 to code on Objective-C. I want to know how can I keep the navigation bar shown when I create a modal segue between 2 View controllers, because I\'m do
There is an easier way to do this. Like previous comments said (but didn't explain all the steps) you need to embed your desired destination view controller in a navigation controller, then set your destination view controller to be the Navigation Controller, then the Navigation controller calls the destination view controller.
First, embed the VC in a NavVC. Then you must write the code to set the segue destination to be the Nav VC.
The code looks like this:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
UINavigationController *nav = segue.destinationViewController;
AddTriviaVC *triv = [[AddTriviaVC alloc]init];
triv = nav.viewControllers[0];
triv.location = self.location;
}
I hope this makes sense.