0

I am trying to access third party cloud applications. my app upload button click to open UIDocumentPickerViewController and need to pick files (single or multiple) then I am uploading my server.

  1. Upload button click to UIDocumentPickerViewController opening fullscreen not opening like action sheet.

  2. Need to access all type of files.

Here below my code

let importMenu = UIDocumentPickerViewController(documentTypes: ["public.text", "com.apple.iwork.pages.pages", "public.data"], in: .import)
importMenu.delegate = self
importMenu.modalPresentationStyle = .formSheet            
if let popoverPresentationController = importMenu.popoverPresentationController {
    popoverPresentationController.sourceView = self.view;
    //popoverPresentationController.sourceView = sender as? UIView
    //popoverPresentationController.sourceRect = sender.bounds
}
self.present(importMenu, animated: true, completion: nil)  
Vinodh
  • 5,262
  • 4
  • 38
  • 68
  • why you suppose it will show you action sheet like behavior ? UIDocumentPickerViewController is viewController it will not show you action sheet like behavior that is kind on alertViewController. – Abu Ul Hassan Aug 10 '18 at 13:13

1 Answers1

0

Check documentation your answer is in below image. enter image description here

Abu Ul Hassan
  • 1,340
  • 11
  • 28