Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,5 @@ Derived/

### Tuist managed dependencies ###
Tuist/Dependencies

.mise.toml
10 changes: 10 additions & 0 deletions iBox/Sources/Web/WebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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
}
}