我有一个基于Swift的iOS应用程序,需要能够打开任何文件类型的文件。我试过了
let types = UTType.types(tag: "*", tagClass: UTTagClass.filenameExtension, conformingTo: nil)
let modelPicker = UIDocumentPickerViewController(forOpeningContentTypes: types)但不起作用。如何允许任何文件类型?
有效的代码是,
let types = [UTType.item]
let modelPicker = UIDocumentPickerViewController(forOpeningContentTypes: types)发布于 2022-10-06 01:20:24
https://stackoverflow.com/questions/73966413
复制相似问题