iOS倒计时

wkwebview 关闭缩放

2020-05-18  本文已影响0人  铁汁红豆

备忘下

-(void)webView:(WKWebView*)webView didFinishNavigation:(WKNavigation*)navigation{

NSString*injectionJSString=@"var script = document.createElement('meta');"

                                            "script.name = 'viewport';"

                                            "script.content=\"width=device-width, user-scalable=no\";"

                                            "document.getElementsByTagName('head')[0].appendChild(script);";

[webView evaluateJavaScript:injectionJSString completionHandler:nil];

}

上一篇下一篇

猜你喜欢

热点阅读