Created
June 7, 2018 16:04
-
-
Save mansi-27/58646e524765510e0c4c7020e8390fcb to your computer and use it in GitHub Desktop.
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
| extension MyViewController: UIDocumentMenuDelegate, UIDocumentPickerDelegate { | |
| func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentAt url: URL) { | |
| /// Handle your document | |
| } | |
| func documentMenu(_ documentMenu: UIDocumentMenuViewController, didPickDocumentPicker documentPicker: UIDocumentPickerViewController) { | |
| documentPicker.delegate = self | |
| documentPicker.modalPresentationStyle = .overCurrentContext | |
| present(documentPicker, animated: true, completion: nil) | |
| } | |
| func documentPickerWasCancelled(_ controller: UIDocumentPickerViewController) { | |
| /// Picker was cancelled! Duh 🤷🏻♀️ | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment