UIDocumentInteractionController不适用于具有多个页面的大型PDF文件。Swift:UIDocumentInteractionController不工作?
在我的代码这里,
var docController:UIDocumentInteractionController!
...
DispatchQueue.main.async (execute: { [weak self] in
self?.docController = UIDocumentInteractionController(url: pdfFileURL!)
self?.docController.delegate = self
self?.docController.name = pdfFileURL?.lastPathComponent
self?.docController.presentPreview(animated: true)
})
和委托方法,
func documentInteractionControllerViewControllerForPreview(_ controller: UIDocumentInteractionController) -> UIViewController {
return self
}
这是在操作台的警告,
2017-05-26 12:46:51.178894 MyApp [3350:1136818] [default] View service did terminate with error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted} #Remote
下面连接的是空白图像,
请帮我谢谢。
任何运气?我在一艘类似的船上。我有一切设置正确,但是当我调用presentPreview(animated:)时,它每次都返回false。它也没有调用我的委托方法'documentInteractionControllerViewControllerForPreview' – atreat