Ios 是否可以在容器中显示UIDocumentInteractionController?
我在容器视图中有一个UIViewController。视图控制器在UIDocumentInteractionController中显示PDF,如下所示:Ios 是否可以在容器中显示UIDocumentInteractionController?,ios,Ios,我在容器视图中有一个UIViewController。视图控制器在UIDocumentInteractionController中显示PDF,如下所示: let documentInteractionController = UIDocumentInteractionController(url: pdfUrl) documentInteractionController.delegate = self documentInteractionController.presentPreview(a
let documentInteractionController = UIDocumentInteractionController(url: pdfUrl)
documentInteractionController.delegate = self
documentInteractionController.presentPreview(animated: true)
UIDocumentInteractionController以模式显示自身。我想把它放在集装箱里。这可能吗?对此的回答有点晚,但我最近有同样的问题-我不确定您的完整导航设置,但在下面的委托方法中返回导航控制器将显示导航堆栈中的预览。(返回任何其他内容将显示默认模式视图) 此处的文档:
func documentInteractionControllerViewControllerForPreview(_ controller: UIDocumentInteractionController) -> UIViewController {
//return self to present modally
//return nav controller to push document preview into the stack
return self.navigationController!
}