我有一个UITabbarController与UINavigationController。 NavigationController中的视图呈现一个MVC(AddClockNavigationController)。这个MVC有一个带有视图的笔尖和一个UINavigationController。 NavigationController.view作为子视图添加到MVC的视图中。dismissModalViewControllerAnimated不工作
我的MVC中的NavigationController有两个按钮,一个是Cancel和一个Done。当按其中任何一个时,MVC应该被解雇。 这些按钮的IBActions在UINavigationController视图(AddClockViewController)中,但每当按下它们时,MVC都不会消失。 如果我将这些动作放入MVC中,它确实会消失。 如果我把函数放在我的MVC中,并使用[self.parentViewController myFunction]从我的viewController调用它,它并不会消失。
我怎样才能让它从我的视野中消失?
我想我的ex is很乱,但我希望你能理解。
从我的IB一个观点:
最好的问候,
保罗Peelen
编辑 我与[self dismissModalViewControllerAnimated:YES];
试过,[self.parentViewController dismissModalViewControllerAnimated:YES];
,[self.navigationController dismissModalViewControllerAnimated:YES];
,[self.parentViewController.navigationController dismissModalViewControllerAnimated:YES];
和,如前所述,用在父视图中解除它的功能。什么都没有
嗨,我试过......但它不会工作。此外,第二个NavigationController的原因是因为视图加载(一个UIViewController)扣留UITableView与单元格推到下一个视图。这不适用于“公正”和NavigationBar。 – 2011-02-03 07:57:01