导航栏不会出现在popupovercontrol中的uiviewtable中

时间:2012-06-30 07:32:10

标签: objective-c ios cocoa-touch ipad

我有PopupoverControl,这个弹出窗口有UIViewtablecontrol,其中一个UITable控件应导航到另一个UIViewtablecontrol,但它不导航这是第一个uitableview中选择的代码:

OpenFileViewController *openfileview = [[OpenFileViewController alloc] initWithNibName:@"OpenFileViewController" bundle:nil v_files:[self GetFiles] v_ui:parentview];
        UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:openfileview];
        [self.navigationController presentModalViewController:navController animated:YES];
在uiviewtable的.xib文件中的

我启用了带导航栏的顶栏但是它没有出现原因?

1 个答案:

答案 0 :(得分:0)

无需使用新的navController,请尝试此选择:

[self.navigationController pushViewController:openfileview animated:YES];

修改

popover的根视图控制器应该是UINavigationController对象,所以在创建popover时尝试这个:

UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController: optionw];
UIPopoverController *optioandiaglog= [[UIPopoverController alloc] initWithContentViewController:navController];