marinofaggiana há 5 anos atrás
pai
commit
2a905fa192
1 ficheiros alterados com 7 adições e 0 exclusões
  1. 7 0
      iOSClient/Main/NCDetailViewController.swift

+ 7 - 0
iOSClient/Main/NCDetailViewController.swift

@@ -357,6 +357,13 @@ class NCDetailViewController: UIViewController {
                     }
                     
                     viewerPDF.setupPdfView(filePath: URL(fileURLWithPath: filePath), view: backgroundView)
+                    
+                } else {
+                    
+                    let frame = CGRect(x: 0, y: 0, width: self.backgroundView.frame.width, height: self.backgroundView.frame.height)
+                    let viewerDocumentWeb = NCViewerDocumentWeb.init(frame: frame, configuration: WKWebViewConfiguration())
+                    
+                    viewerDocumentWeb.viewDocumentWebAt(metadata, view: backgroundView)
                 }
                 
                 return