在 iOS 13 中,模态视图 Controller 在呈现时有一个新行为。
现在默认情况下它不是全屏的,当我尝试向下滑动时,应用程序会自动关闭 View Controller 。
如何防止这种行为并返回到旧的全屏模式 vc?
谢谢
最佳答案
使用 iOS 13,如 Platforms State of the Union 中所述在 WWDC 2019 期间,Apple 推出了新的默认卡片演示。为了强制全屏,您必须明确指定它:
let vc = UIViewController()
vc.modalPresentationStyle = .fullScreen //or .overFullScreen for transparency
self.present(vc, animated: true, completion: nil)
关于ios - 在 iOS 13 全屏中呈现模态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56435510/