2017-08-23 1 views

Antwort

0

Das Problem kann darin bestehen, dass Sie keine Referenz auf Ihre UIDocumentInteractionController Instanz als eine Eigenschaft Ihres View-Controllers behalten. Versuchen Sie etwas wie folgt:

var documentInteractionController: UIDocumentInteractionController? 

... 

func showFileWithPath(path: String) { 
    if FileManager.default.fileExists(atPath: path) { 
     documentInteractionController = UIDocumentInteractionController(url: URL(fileURLWithPath: path)) 
     documentInteractionController?.delegate = self 
     documentInteractionController?.presentPreview(animated: true) 
    } 
} 
+0

ja ich tat es schon –

+0

aber immer noch nicht funktioniert –

Verwandte Themen