Skip to content

Instantly share code, notes, and snippets.

@Yorzic
Created May 29, 2020 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yorzic/ffeda7914f83777b9470ee0a49b1ceff to your computer and use it in GitHub Desktop.
Save Yorzic/ffeda7914f83777b9470ee0a49b1ceff to your computer and use it in GitHub Desktop.
Trigger UIDocumentPickerViewController
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