move to web view

This commit is contained in:
Scott Pfeil 2022-01-14 14:34:54 -05:00
parent d8ad52dfda
commit 5043ba5ba4

View File

@ -8,6 +8,7 @@
import UIKit
import WebKit
import SafariServices
@objcMembers open class WebView: View, MVMCoreUIViewConstrainingProtocol {
@ -175,7 +176,11 @@ extension WebView : WKNavigationDelegate {
let urlString = url.absoluteString.removingPercentEncoding,
!urlString.contains("#") {
MVMCoreDispatchUtility.performBlock(onMainThread: {
UIApplication.shared.open(navigationAction.request.url!, options: [:], completionHandler: nil)
// Presents standard webview.
let safariViewController = SFSafariViewController(url: url)
safariViewController.preferredBarTintColor = .white
safariViewController.preferredControlTintColor = .black
MVMCoreNavigationHandler.shared()?.present(safariViewController, animated: true)
})
decisionHandler(.cancel)
} else {