我将以下代码用于用户选择文件:
let importMenu = UIDocumentMenuViewController(documentTypes: [String(kUTTypePDF), "org.openxmlformats.wordprocessingml.document"], in: .import)
importMenu.delegate = self
importMenu.modalPresentationStyle = .formSheet
self.present(importMenu, animated: true, completion: nil)
打开浏览器后,如果我单击取消,则会丢失缺少的ViewController!
我想要单击取消按钮就可以控制它并手动关闭浏览器