Presenting modal in iOS 13 fullscreen(在 iOS 13 全屏中呈现模式)
问题描述
在 iOS 13 中,模态视图控制器在呈现时具有新的行为.
In iOS 13 there is a new behaviour for modal view controller when being presented.
现在它默认不是全屏的,当我尝试向下滑动时,应用程序会自动关闭视图控制器.
Now it's not fullscreen by default and when I try to slide down, the app just dismiss the View Controller automatically.
如何防止这种行为并恢复到旧的全屏模式 vc?
How can I prevent this behaviour and get back to the old fullscreen modal vc?
谢谢
推荐答案
使用 iOS 13,如 Platforms State of the Union 在 WWDC 2019 期间,Apple 推出了新的默认卡片演示.为了强制全屏,您必须明确指定它:
With iOS 13, as stated in the Platforms State of the Union during the WWDC 2019, Apple introduced a new default card presentation. In order to force the fullscreen you have to specify it explicitly with:
let vc = UIViewController()
vc.modalPresentationStyle = .fullScreen //or .overFullScreen for transparency
self.present(vc, animated: true, completion: nil)
这篇关于在 iOS 13 全屏中呈现模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 iOS 13 全屏中呈现模式


- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01