首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >modalPresentationStyle默认值在iOS 13中

modalPresentationStyle默认值在iOS 13中
EN

Stack Overflow用户
提问于 2019-09-30 09:30:24
回答 3查看 5.8K关注 0票数 5

根据苹果公司的文件,

此属性的默认值为UIModalPresentationStyle.automatic

在iOS 12中,默认值是UIModalPresentationStyle.fullScreen,这就是我得到的。

但是当我在iOS 13上运行我的应用程序时,我得到的是.pageSheet as navigationController.modalPresentationStyle

我做错了什么吗?还是默认值是.pageSheet?

EN

Stack Overflow用户

回答已采纳

发布于 2019-09-30 10:00:28

  1. UIModalPresentationStyle.automatic.pageSheet.fullScreen之间切换取决于UIViewController是presented.
  2. If的上下文--您使用的是普通的UIViewController,如果您使用的是UIViewController的某些子类,比如UIImagePickerController iOS,则默认为.pageSheet.
  3. But,希望内容处于全屏模式,因此默认使用.fullscreen.
  4. If。iOS版本小于13,它将始终默认为13
票数 10
EN
查看全部 3 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58165069

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档