Commit d04078c6 authored by Alex朱枝文's avatar Alex朱枝文

解决webview可能在iOS14.8机器可能出现的崩溃

parent bd6f893c
......@@ -18,11 +18,14 @@ class YHH5WebViewVC: YHBaseViewController, WKUIDelegate, WKNavigationDelegate {
lazy var webview : DWKWebView = {
let config = WKWebViewConfiguration()
config.applicationNameForUserAgent = "YinHeApp"
#if DEBUG
if #available(iOS 14.5, *) {
config.upgradeKnownHostsToHTTPS = false
} else {
// Fallback on earlier versions
}
#endif
let webview = DWKWebView(frame: .zero, configuration: config)
webview.scrollView.contentInsetAdjustmentBehavior = .never
webview.navigationDelegate = self
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment