gpt4 book ai didi

ios - ViewController - 全屏

转载 作者:行者123 更新时间:2023-12-02 11:56:10 26 4
gpt4 key购买 nike

第二个 ViewController 的顶部有这个空间,它几乎在手机上显示为可关闭的弹出窗口。如何使全屏显示(删除橙色箭头指向的空间)?

enter image description here

最佳答案

这是 iOS 13 的一项更改。用户将开始期望能够滑动模式,因此可能值得考虑支持这一点。

如果您确实决定使用旧的演示样式,则可以通过在演示之前设置所演示的 viewController 的 modalPresentationStyle 来实现:

vc.modalPresentationStyle = .fullScreen

或者在 View Controller 本身中覆盖它:

override var modalPresentationStyle: UIModalPresentationStyle {
get { .fullScreen }
set { assertionFailure("Shouldnt change that 😠") }
}

或者在 Storyboardsegue中设置:

storyboard segue example

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

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