I have UIWebView
, WKWebView
and loadHTMLString:baseURL:
to load local HTML but wkWebView
is slower than UIWebVIew
. What is the reason? How can I improve the rendering speed?
5
votes
3 Answers
3
votes
Yes, I have the problem too. there is a solution by Timur Bernikowich: https://github.com/bernikowich/NSTViewWarmuper
But, WKWebView
is also slower than UIWebView
with using loadHTMLString:baseURL:
method.
For more see here: https://stackoverflow.com/a/42109186/5557953
0
votes
0
votes
Disabling WKWebView
's data detectors worked for me. Swift version:
let webViewCofig = WKWebViewConfiguration()
webViewCofig.dataDetectorTypes = []
webView = WKWebView(frame: view.frame, configuration: webViewCofig)
To enable specific data detector, pass the specific type as .address,.link etc while setting dataDetectorTypes:
config.dataDetectorTypes = [.address]