From 02c2f171a338181af8fb33469fddfd64dd83972b Mon Sep 17 00:00:00 2001 From: JH713 Date: Sat, 27 Apr 2024 00:13:14 +0900 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20.gitignore=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 551a3f5..dfaea8b 100644 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,5 @@ Derived/ ### Tuist managed dependencies ### Tuist/Dependencies + +.mise.toml From be319002b14a2eb05d558749ec4ea4f9d4e6212c Mon Sep 17 00:00:00 2001 From: JH713 Date: Sat, 27 Apr 2024 00:17:38 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20web=20View=20=EC=95=88=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=83=88=20=EC=B0=BD=20=EC=9D=B4=EB=8F=99=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EA=B2=BD=EC=9A=B0=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iBox/Sources/Web/WebView.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/iBox/Sources/Web/WebView.swift b/iBox/Sources/Web/WebView.swift index 298a1d7..760425d 100644 --- a/iBox/Sources/Web/WebView.swift +++ b/iBox/Sources/Web/WebView.swift @@ -71,6 +71,7 @@ class WebView: UIView { private func setupProperty() { backgroundColor = .backgroundColor webView.navigationDelegate = self + webView.uiDelegate = self progressObserver = webView.observe(\.estimatedProgress, options: .new) { [weak self] webView, _ in self?.progressView.setProgress(Float(webView.estimatedProgress), animated: true) } @@ -221,3 +222,12 @@ extension WebView: UIGestureRecognizerDelegate { } } + +extension WebView: WKUIDelegate { + func webView(_ webView: WKWebView, createWebViewWith configuration: WKWebViewConfiguration, for navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures) -> WKWebView? { + if navigationAction.targetFrame == nil { + webView.load(navigationAction.request) + } + return nil + } +}