Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.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 Swift UIDocumentPickerViewController不显示类似于操作表弹出窗口_Ios_Swift_Uidocumentpickerviewcontroller - Fatal编程技术网

Ios Swift UIDocumentPickerViewController不显示类似于操作表弹出窗口

Ios Swift UIDocumentPickerViewController不显示类似于操作表弹出窗口,ios,swift,uidocumentpickerviewcontroller,Ios,Swift,Uidocumentpickerviewcontroller,我正在尝试访问第三方云应用程序。我的应用程序上载按钮单击打开UIDocumentPickerViewController,需要选择文件(单个或多个),然后我将上载我的服务器 上载按钮单击以UIDocumentPickerViewController打开全屏,而不是像操作表一样打开 需要访问所有类型的文件 下面是我的代码 let importMenu = UIDocumentPickerViewController(documentTypes: ["public.text", "com.apple

我正在尝试访问第三方云应用程序。我的应用程序上载按钮单击打开
UIDocumentPickerViewController
,需要选择文件(单个或多个),然后我将上载我的服务器

  • 上载按钮单击以
    UIDocumentPickerViewController
    打开全屏,而不是像操作表一样打开

  • 需要访问所有类型的文件

  • 下面是我的代码

    let importMenu = UIDocumentPickerViewController(documentTypes: ["public.text", "com.apple.iwork.pages.pages", "public.data"], in: .import)
    importMenu.delegate = self
    importMenu.modalPresentationStyle = .formSheet            
    if let popoverPresentationController = importMenu.popoverPresentationController {
        popoverPresentationController.sourceView = self.view;
        //popoverPresentationController.sourceView = sender as? UIView
        //popoverPresentationController.sourceRect = sender.bounds
    }
    self.present(importMenu, animated: true, completion: nil)  
    

    检查文档您的答案在下图中。

    为什么您认为它会显示出类似于行动表的行为?UIDocumentPickerViewController是viewController,它不会向您显示类似于alertViewController的操作表行为。