![](/img/trans.png)
[英]dismiss a modally presented view controller to a different underlying view controller
[英]Dismiss view controller flipped from modally presented view controller
我从UIViewController A模态呈现UIViewControllerB。然后,在B和C之间有一个UINavigationController,并且C从B翻转了。我想关闭B和C并直接对A进行动画处理,而不显示B,因此无需调用B的viewDidLoad函数。 我正在从A调用dismissViewControllerAnimated,但是它仍然首先显示B,因此调用B的viewDidLoad函数。 如果对此已经有一个答案,请原谅我。 我已经窥探了几个小时,却找不到答案。 我该如何解决?
可以使用以下方式消除模态显示的任何父级ViewController :
[self.parentViewController dismissModalViewControllerAnimated:YES];
另一种方法是使用:
[self.presentingViewController.presentingViewController dismissViewControllerAnimated:YES completion:nil];
让我知道它是否无效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.