iOS 13 presint VC 模式在横向模式下不起作用

iOS 13 present VC modally doesn't work in landcape mode

我正在使用新的 iOS 13 模态 ViewController 演示文稿。在纵向模式下,它在页面 sheet 中工作正常。我可以向下滑动。但在横向模式下它看起来像全屏。不像页面 sheet.

我正在使用代码显示页面 sheet :

let vc = ContactVC()
vc.modalPresentationStyle = .pageSheet
self.present(vc, animated: true, completion: nil)

为什么它不能在横向模式下工作。我遗漏了什么吗?

你的代码没问题。问题是,只有 iPhone XS Max 和 iPhone Plus 型号使用新的 iOS 13 演示风格 在横向模式下

参考这篇中篇文章: https://medium.com/@hacknicity/view-controller-presentation-changes-in-ios-13-ac8c901ebc4e

Form/page/popover presentations on Landscape iPhone Plus and XS Max devices don’t fill the screen because they are regular width.

这意味着,他们的屏幕足够大,甚至可以在横向模式下以新的方式呈现。