从选项卡控制器在当前上下文中显示模型视图控制器后出现黑屏

时间:2018-07-16 07:08:40

标签: ios iphone swift popup runtime-error

我正在为自己的应用创建弹出错误消息。我遵循了Youtube中的教程。由于我的应用程序是出现弹出窗口时的选项卡栏应用程序,因此用户按下另一个选项卡然后返回到该特定选项卡时,背景已更改!知道这里发生了什么吗?

1。这是弹出窗口出现的时间 enter image description here

2。这是更改标签然后返回到该特定标签的时间 enter image description here

3。这是用户更改标签后关闭弹出窗口的最后状态 enter image description here

如果用户一开始就关闭弹出窗口,这些错误都不会发生!

let next = self.storyboard?.instantiateViewController(withIdentifier: "ErrorVC")
self.present(next!, animated: true, completion: nil)

这是我在页面中用来显示符合条件的弹出窗口的代码!!!

我有2个viewController,第二个是弹出窗口。

enter image description here

1 个答案:

答案 0 :(得分:2)

definesPresentationContext的{​​{1}}属性设置为要显示true的前UIViewControllerviewController的{​​{1}}

pop-view
相关问题