gpt4 book ai didi

ios - 关闭 2 个 ViewController

转载 作者:行者123 更新时间:2023-11-29 02:53:32 25 4
gpt4 key购买 nike

我正在制作一个应用程序,而弹出窗口 ViewController 在按下按钮时模态到新的 ViewController。当用户在新的 VC 中完成时,他/她按下 ok,这应该与弹出窗口 ViewController 一起被关闭。我尝试使用通知来触发弹出窗口 VC 关闭,但我不能,因为另一个正在同时被关闭。

我看到解雇代码有一个完成标记:

[self dismissViewControllerAnimated:YES completion:nil];

我如何设置 completion:popoverVC 并让它处理它?<​​/p>

非常感谢!

最佳答案

你可以试试:

[self dismissViewControllerAnimated:YES completion:^{
[self.parentViewController dismissViewControllerAnimated:YES completion:NULL];
}];

关于ios - 关闭 2 个 ViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24206352/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com