Created
May 29, 2020 16:13
-
-
Save Yorzic/ffeda7914f83777b9470ee0a49b1ceff to your computer and use it in GitHub Desktop.
Trigger UIDocumentPickerViewController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func selectFile() { | |
let importMenu = UIDocumentPickerViewController(documentTypes: [(kUTTypeCommaSeparatedText as String)], in: .import) | |
importMenu.delegate = self | |
importMenu.modalPresentationStyle = .formSheet | |
self.present(importMenu, animated: true, completion: nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment