Implement Document Picker in swift (iOS)

后端 未结 8 2164
滥情空心
滥情空心 2020-11-30 19:54

I want to pick a file of any type(.pdf, .docs, .xlsx, .jpeg, .txt, .rtf, etc) functionality in my iOS app. On clicking on Upload button, I want my app to op

8条回答
  •  粉色の甜心
    2020-11-30 20:30

    iCloud access all type of files #

    func openiCloudDocuments(){
        let importMenu = UIDocumentPickerViewController(documentTypes: [String("public.data")], in: .import)
        importMenu.delegate = self
        importMenu.modalPresentationStyle = .formSheet
        self.present(importMenu, animated: true, completion: nil)
    }
    

提交回复
热议问题