我使用下面的代码来显示文档选择器。当我显示选择器时,我使用下面的代码
let documentPickerController = UIDocumentPickerViewController(documentTypes: [String(kUTTypeText), String(kUTTypePDF), String(kUTTypePNG), String(kUTTypeJPEG), String(kUTTypePlainText), String(kUTTypeImage)], in: .import)
上面的代码向我显示了 iCloud 中的所有文件,但它不允许我选择 doc、docx 文件。这些文件显示为已禁用。
但是当我"public.data"
在构造函数中添加为元素时,UIDocumentPickerViewController
它允许我选择 doc,docx 文件和文件不会显示为禁用。
请告诉我为什么会这样?