【发布时间】:2015-03-12 03:45:07
【问题描述】:
我正在使用以下代码展示一个模态视图控制器,
[[mInfo objectForKey: kNavigationController] presentViewController:(UIViewController*)modalViewControlr animated:YES completion:nil];
UITableView。在选择表格视图单元格时,我想将其导航到另一个名为 navigatedView 的 UIView。
这可以通过在导航控制器中嵌入自我(即modalViewControlr)并将视图(即navigatedView)添加到视图控制器并呈现它来完成吗?
例如,
// in modalViewControlr
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
//
UINavigationController *passcodeNavigationController = [[UINavigationController alloc] initWithRootViewController:self];
UIViewController *vc = [[UIViewController alloc]init];
[vc.view addSubview:self.navigatedView];
self.navigatedView.frame=vc.view.frame;
[passcodeNavigationController pushViewController: vc animated:YES];
//
}
请帮忙....
【问题讨论】:
标签: ios uinavigationcontroller modalviewcontroller