I have the following code:
- (IBAction)showDirectMessage:(id)sender
{
DetailMessageViewController * dmvc = [[DetailMessageViewController alloc] init];
dmvc.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:dmvc animated:YES];
}
What I am trying to do here is to present a view which has a NavigationBar on top and a UITableView as the view inside. However as of now it only shows the UITableView. I am confused on what I need to change. In my DetailMessageViewController IB I dragged in a UINavigationController and put in a UITableView inside as a view. However, I hooked up the UINavigationController to the UITableView view’s.. I think this is wrong. I don’t know how am I supposed to do this. Can someone guide me through?
You should use presenting new NavigationController with your ViewController.