Docx support in UIWebview(iOS)?

后端 未结 3 2078
离开以前
离开以前 2021-02-06 06:44

I have checked the official links for doc support, and it\'s clear that docx is not supported in UIWebview.

But, I also found out that some guys were able to open docx f

3条回答
  •  情书的邮戳
    2021-02-06 07:38

    Using UIWebView to display select document types

    As per the Apple documentation, docx isn't supported by UIWebView and is deprecated.

    To open docx in app use UIDocumentInteractionController.

    DispatchQueue.main.async {
          let docOpener = UIDocumentInteractionController.init(url: fileURL)
          docOpener.delegate = self
          docOpener.presentPreview(animated: true)
    }
    

提交回复
热议问题