我想使用UIDocumentPickerViewController
来选择一个文件夹,然后读取该文件夹的内容。我使用以下代码,但是点击文件夹不会导致调用didPickDocumentsAt
委托。我需要的只是该文件夹的URL。
let documentPicker = UIDocumentPickerViewController(documentTypes: [String(kUTTypeFolder)], in: .open)
documentPicker.delegate = self
documentPicker.allowsMultipleSelection = true
present(documentPicker, animated: true) {
print("done presenting")
}