Marino Faggiana 6 년 전
부모
커밋
affcc332e5
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      iOSClient/Richdocument/NCRichdocument.swift

+ 6 - 1
iOSClient/Richdocument/NCRichdocument.swift

@@ -59,7 +59,12 @@ class NCRichdocument: NSObject, WKNavigationDelegate, WKScriptMessageHandler {
     }
     
     public func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
-        print("WKScriptMessage");
+        
+        if (message.name == "RichDocumentsMobileInterface") {
+            if message.body as! String == "close" {
+                print("\(message.body)")
+            }
+        }
     }
     
     public func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {