I am developing an application which has the capability to import an audio file from other cloud resources which provide UIDocumentPickerViewControllerExtenstion to choose the file but there is location button on the top left side I want to remove this.
below is my code :
let menupicker = UIDocumentMenuViewController(documentTypes: [kUTTypeAudio as String], in: .import)
menupicker.delegate = self
self.present(menupicker, animated: true, completion: nil)
func documentMenu(_ documentMenu: UIDocumentMenuViewController, didPickDocumentPicker documentPicker: UIDocumentPickerViewController) {
documentPicker.delegate = self
documentPicker.navigationItem.leftBarButtonItem = nil
self.present(documentPicker, animated: true) {
documentPicker.navigationItem.leftBarButtonItem = nil
documentPicker.navigationItem.backBarButtonItem = nil
documentPicker.navigationItem.hidesBackButton = true
}
}