marinofaggiana 4 rokov pred
rodič
commit
e26771e992

+ 1 - 1
iOSClient/Diagnostics/NCCapabilitiesViewController.swift

@@ -199,7 +199,7 @@ class NCCapabilitiesViewController: UIViewController, UIDocumentInteractionContr
                 if let view = self.appDelegate.window?.rootViewController?.view {
                     self.documentController = UIDocumentInteractionController(url: fileURL)
                     self.documentController?.delegate = self
-                    self.documentController?.presentOptionsMenu(from: view.frame, in: view, animated: true)
+                    self.documentController?.presentOptionsMenu(from: CGRect.zero, in: view, animated: true)
                 }
             } catch { }
         }

+ 4 - 4
iOSClient/Networking/NCNetworkingNotificationCenter.swift

@@ -68,19 +68,19 @@ import Foundation
                             if metadata.contentType.contains("opendocument") && !NCUtility.shared.isRichDocument(metadata) {
                                 
                                 if let view = appDelegate.window?.rootViewController?.view {
-                                    documentController?.presentOptionsMenu(from: view.frame, in: view, animated: true)
+                                    documentController?.presentOptionsMenu(from: CGRect.zero, in: view, animated: true)
                                 }
                                 
                             } else if metadata.typeFile == k_metadataTypeFile_compress || metadata.typeFile == k_metadataTypeFile_unknown {
 
                                 if let view = appDelegate.window?.rootViewController?.view {
-                                    documentController?.presentOptionsMenu(from: view.frame, in: view, animated: true)
+                                    documentController?.presentOptionsMenu(from: CGRect.zero, in: view, animated: true)
                                 }
                                 
                             } else if metadata.typeFile == k_metadataTypeFile_imagemeter {
                                 
                                 if let view = appDelegate.window?.rootViewController?.view {
-                                    documentController?.presentOptionsMenu(from: view.frame, in: view, animated: true)
+                                    documentController?.presentOptionsMenu(from: CGRect.zero, in: view, animated: true)
                                 }
                                 
                             } else {
@@ -94,7 +94,7 @@ import Foundation
                         if UIApplication.shared.applicationState == UIApplication.State.active {
                             
                             if let view = appDelegate.window?.rootViewController?.view {
-                                documentController?.presentOptionsMenu(from: view.frame, in: view, animated: true)
+                                documentController?.presentOptionsMenu(from: CGRect.zero, in: view, animated: true)
                             }
                         }
                         

+ 4 - 4
iOSClient/Viewer/NCViewerRichdocument/NCViewerRichdocument.swift

@@ -30,7 +30,7 @@ class NCViewerRichdocument: UIViewController, WKNavigationDelegate, WKScriptMess
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
     var webView = WKWebView()
     var bottomConstraint : NSLayoutConstraint?
-    var documentInteractionController: UIDocumentInteractionController!
+    var documentController: UIDocumentInteractionController?
     
     var link: String = ""
     var metadata: tableMetadata = tableMetadata()
@@ -237,9 +237,9 @@ class NCViewerRichdocument: UIViewController, WKNavigationDelegate, WKScriptMess
                                         // end.
                                     })
                                 } else {
-                                    self.documentInteractionController = UIDocumentInteractionController()
-                                    self.documentInteractionController.url = URL(fileURLWithPath: item)
-                                    self.documentInteractionController.presentOptionsMenu(from: self.appDelegate.window.rootViewController!.view.bounds, in: self.appDelegate.window.rootViewController!.view, animated: true)
+                                    self.documentController = UIDocumentInteractionController()
+                                    self.documentController?.url = URL(fileURLWithPath: item)
+                                    self.documentController?.presentOptionsMenu(from: CGRect.zero, in: self.view, animated: true)
                                 }
                             } else {
                                 NCContentPresenter.shared.messageNotification("_error_", description: errorDescription, delay: TimeInterval(k_dismissAfterSecond), type: NCContentPresenter.messageType.error, errorCode: errorCode)