VC "B" öğesini genel olarak sunan bir VC "A" var. B UIDocumentMenuViewController
UIDocumentMenuDelegate
protokol En kısa sürede B'nin dismiss(animated:completion:)
çağrılan ve ben neden hiçbir ipucu çağrılan documentMenuWasCancelled(_ documentMenu:)
veya documentMenu(_:didPickDocumentPicker:)
olarak B.UIDocumentMenuViewController, görüntüleme denetleyicisini reddetti
uygulanmaktadır sunar. Eğer ben uygulamaya temsilci işlevinde hiçbir şey görebileceğiniz gibi
İşte benim kod
func presentDocumentPicker() {
let documentTypes = [
kUTTypeCompositeContent as String,
kUTTypePDF as String,
"com.microsoft.word.doc",
"vnd.openxmlformats-officedocument.wordprocessingml.document"
]
let documentMenuViewController = UIDocumentMenuViewController(documentTypes: documentTypes, in: .import)
documentMenuViewController.delegate = self
present(documentMenuViewController, animated: true, completion: nil)
}
// MARK: - Document Menu View Controller Delegate
func documentMenu(_ documentMenu: UIDocumentMenuViewController, didPickDocumentPicker documentPicker: UIDocumentPickerViewController) {
print("did pick")
}
func documentPickerWasCancelled(_ controller: UIDocumentPickerViewController) {
print("was cancelled")
}
bu. Ve hala B işten çıkarıldı. Anlamadım.
Projenin daha fazlasını veya en azından orada sahip olduğunuz ViewControllers'a gönderebilir misiniz? –
Aslında şu anda yeniden üretemiyorum: D – lukwuerz
her iki denetleyicinin nasıl sunulduğuna dair bir sorun olabilir .. –