在我的应用程序中,从iclouds导出文件。想要上传xlsx,docx,txt。
要上传xlsx文件,意味着从iclouds衍生出只希望显示xlsx的文件,而其他文件则不应显示。[docx,txt]
与用户要显示docx文件相同,意味着xlsx和txt不应显示xlsx文件。
这是我的代码
@IBAction func moveiclouds_BtnClick(_ sender: Any) {
let documentPicker = UIDocumentPickerViewController(documentTypes: [kUTTypePDF as String, "com.microsoft.word.doc", "com.microsoft.excel.xls", kUTTypeCompositeContent as String, kUTTypeJPEG as String], in: .import)
documentPicker.delegate = self
self.present(documentPicker, animated: true, completion: nil)
}
extension CreateFeesView: UIDocumentPickerDelegate{
func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentAt url: URL) {
let cico = url as URL
cico_files = cico
filepath_fees = url.pathExtension
}
}
从iclouds的