我最近将XCode更新为11.0版。自从对一个旧项目进行更新以来,古怪的行为一直在发生。当我以模态方式选择到新页面时,该页面无法显示整个屏幕,而是看起来盘旋。
这是视图的图片:https : //imgur.com/dAxEr4q
我希望页面能像升级之前一样占据设备屏幕的整个长度。
在此先感谢您的协助。
这与iOS 13中新的默认模式演示文稿样式有关。
要设置先前的行为,您需要将演示文稿样式更改为全屏。
您可以在故事板上通过编辑segue的Presentation属性并将其从Automatic设置为Full Screen来实现:
另外,如果要以编程方式显示View Controller,则可以modalPresentationStyle
在呈现之前设置View Controller ,如下所示:
let detailController = /* your View Controller */
detailController.modalPresentationStyle = .overFullScreen
present(detailController, animated: true, completion: nil)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句