0

我的程序有 4 个按钮,每个按钮调用一个不同的表格视图。这很好用,但我的问题是,我正在使用的视图控制器显示了一个表格视图,它覆盖了我的导航栏和标签栏。我需要用可以打开表格而不掩盖我的导航栏和标签栏的东西替换该编码。这是我正在使用的编码:-(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];

}

[self presentModalViewController....] 是问题所在。有谁知道如何用保留导航栏和标签栏的东西替换该代码?

谢谢,詹姆

4

1 回答 1

3

在 iPhone 上,所有模式视图控制器都必须是全屏的,如此处所示http://developer.apple.com/iphone/library/documentation/uikit/reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp /UIViewController/modalPresentationStyle

作为替代方案,您可以将 tableview 显示为子视图并调整框架,使其不与导航或工具栏重叠。

于 2010-05-26T00:53:49.070 回答