显示模态 ViewController 可以正常工作:
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:myView];
[self.navigationController presentModalViewController:navController animated:YES];
[navController release];
在我的模态视图中,我有一个导航按钮可以切换回主菜单。通常会调用 [self.navigationController popToViewController:delegate.viewMainmenu animated:YES]; 但这在模态视图中是不可能的。我如何与“ parent ”互动以称呼他,他称之为 popToViewController ?
非常感谢!
Best Answer-推荐答案 strong>
在模态 vc 中使用属性 parentViewController 并调用
[self.parentViewControllerdismissModalViewControllerAnimated: YES];
关于iphone - presentModalViewController : how to interact with parent,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/4795868/
|