I have implemented a document picker and want to avoid the editing of files & folder (like the option to rename,copy,share etc ) while I browse through the document picker. Can anyone please help me since there is nothing like allowsEditing for UIDocumentPickerViewController.
func documentPicker(from view: UIView) {
let importMenu = UIDocumentPickerViewController(documentTypes: [String(kUTTypePDF),
String(kUTTypeJPEG), String(kUTTypeGIF)], in: .import)
importMenu.delegate = self
importMenu.setEditing(false, animated: false)
importMenu.modalPresentationStyle = .popover
if let presentation = importMenu.popoverPresentationController {
presentation.permittedArrowDirections = .any
presentation.sourceView = view
presentation.sourceRect = view.bounds
}
parentController?.present(importMenu, animated: true, completion: nil)
}