【发布时间】:2020-02-02 02:35:54
【问题描述】:
我正在关注视图配置
标签栏 -> 导航控制器 -> 视图:单击一个按钮 -> 转到 -> 另一个视图:单击一个按钮 -> 弹出视图。
此模式视图位于不同的故事板上。
我想全屏展示这个模型视图。我已经尝试过Presenting modal in iOS 13 fullscreen 中提到的这个解决方案,但它不起作用。我也尝试了一些其他解决方案,但弹出视图没有全屏显示,状态栏在顶部可见。
如何全屏显示模态视图?
let storyboard = UIStoryboard(name: "Other", bundle: Bundle.main)
guard let popupVC = storyboard.instantiateViewController(withIdentifier: "PopUpViewController") as? PopUpViewController else {
print("PopUpViewController not found")
return
}
popupVC.modalPresentationStyle = .fullScreen
self.present(popupVC, animated: true, completion: nil)
【问题讨论】:
-
“它不起作用”是什么意思?实际发生了什么?
-
我已经更新了问题。弹出视图未全屏显示,因为状态栏仍然可见。
-
您不想在弹出窗口中看到状态栏?这是你的问题吗?
-
是的。我不想在弹出视图上显示状态栏。
标签: ios swift uinavigationcontroller uitabbarcontroller modalviewcontroller