Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/101.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS 13中的modalPresentationStyle默认值_Ios_Swift_Uiviewcontroller_Uimodalpresentationstyle - Fatal编程技术网

iOS 13中的modalPresentationStyle默认值

iOS 13中的modalPresentationStyle默认值,ios,swift,uiviewcontroller,uimodalpresentationstyle,Ios,Swift,Uiviewcontroller,Uimodalpresentationstyle,根据苹果公司的文件 此属性的默认值为UIModalPresentationStyle.automatic 在iOS 12中,默认值是UIModalPresentationStyle.fullScreen,这就是我得到的 但当我在iOS 13上运行我的应用程序时,我得到的是作为navigationController.modalPresentationStyle的.pageSheet 是否有我做错了什么,或者默认值是.pageSheet?演示样式是自动的,在iOS 13中,当您以模式演示viewc

根据苹果公司的文件

此属性的默认值为UIModalPresentationStyle.automatic

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

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


是否有我做错了什么,或者默认值是.pageSheet?

演示样式是自动的,在iOS 13中,当您以模式演示viewcontroller时,默认为pageSheet

  • UIModalPresentationStyle.automatic.pageSheet.fullScreen之间切换,具体取决于显示UIViewController的上下文
  • 如果您使用的是普通UIViewController,它将默认为.pageSheet
  • 但如果您使用的是UIViewController的某些子类,如UIImagePickerControlleriOS希望内容应处于全屏模式,因此它将默认为。全屏
  • 如果您使用的是iOS版本小于13,它将始终默认为.fullscreen
  • 系统选择的默认显示样式。它是
    UIModalPresentationAutomatic

    自动意味着如果我们使用
    UIImagePickerController
    和sourceType
    .photoLibrary
    ,它将以级联视图的形式出现。和sourceType
    .camera
    ,则它将全屏显示