In one of my classes I have a button that when pressed loads another view controller and view. This is what I use:
FormController *formController1=[[FormController alloc]initWithNibName:nil bundle:nil];
[self presentModalViewController:formController1 animated:YES];
The problem is that it loads the full view, but not the navigation bar that comes with all the other views. What am I doing wrong?
Maybe you shouldn’t be using a modal view controller. If you want the view to appear as part of the navigation stack, you need to load push the view controller onto the navigation view’s stack.
If you want the new modal view controller to be a navigation view controller, then make
formControllerthe root view controller of a UINavigationController, and present the navigation controller as the modal view controller.