views:

138

answers:

1

My program has 4 buttons and each button calls a different table view. That works fine, but my problem is, the view controller I'm using brings up a table view that covers up my navigation bar and my tab bar. I need to replace that coding with something that will bring up a table and not cover up my nav and tab bars. Here is the coding I'm using: -(IBAction)buttonNorthWest {

NorthWestViewController *nwController = [[NorthWestViewController alloc] initWithNibName:@"NorthWestView" bundle:nil];
self.nwViewController = nwController;
[self.view insertSubview:nwViewController.view atIndex:0];


[self presentModalViewController:nwViewController animated:YES];


[nwController release];

}

The [self presentModalViewController....] is the problem. Does anyone know how I can replace that code with something that keeps my nav and tab bars?

Thanks, Jaime

+3  A: 

On the iPhone, all modal view controllers must be full screen as seen here http://developer.apple.com/iphone/library/documentation/uikit/reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle

As an alternative you could display the tableview as a subview and adjust the frame so that it does not overlap the nav or toolbar.

rickharrison
Sorry, I've been away, so haven't done anything with this code in quite some time. I am grateful for your response and will give the subview a try.
Jaime Rae
No problem. Let me know if you have any other questions. I'd be more than glad to help.
rickharrison