0

I have implemented UIDocumentPickerViewController in my class.implemented delegate methods.

I want to know how would I know which option from documentPickerMenu i have selected. I want to implement the dropbox selection in the presented menu of document controller. I want to know it from delegate method.

the methods are as below

func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentAt url: URL) {

    let cico = url as URL
    print("The Url is : \(cico)")
}

func documentMenu(_ documentMenu: UIDocumentMenuViewController, didPickDocumentPicker documentPicker: UIDocumentPickerViewController) {

    documentPicker.delegate = self
    print(documentMenu.accessibilityLabel ?? "Menu")
    present(documentPicker, animated: true, completion: nil)

}

func documentMenuWasCancelled(_ documentMenu: UIDocumentMenuViewController) {

    print("we cancelled")
    dismiss(animated: true, completion: nil)
}

if anyone can help me thanks in advance.

arpita
  • 175
  • 9
  • You can also add optional items to either the top or bottom of this list by calling the 'addOptionWithTitle:image:order:handler:' method. If the user selects one of these items, the system calls its handler. – Ashish Dec 01 '17 at 07:18
  • @Ashish will you please provide method? i want perticular event fire on the tap of dropbox – arpita Dec 01 '17 at 07:20
  • refer stack link https://stackoverflow.com/questions/33127225/why-photos-app-is-not-showing-in-the-document-provider-extensions-on-the-device – Ashish Dec 01 '17 at 07:22
  • @Ashish i dont want to add custom menu because in which ever device dropbox is installed the menu is having two times "dropbox" option. i only want to show the login page of dropbox on the click of default dropbox menu option. – arpita Dec 01 '17 at 07:32

0 Answers0