I would like to use WKWebView instead of UIWebView to display data on iOS. However, it seems that loadData: MIMEType: textEncodingName: baseURL: has been removed in WKWebView.
Is there any way to simulate this functionality in WKWEbView?
Thank!
You can convert NSData to NSString and use loadHTMLString:baseURL:( API Docs ).
loadHTMLString:baseURL:
However, this method has problems with the base file system URLs in the latest beta: WKWebView does not work in iOS 8 beta 4 .
iOS 9.0 WKWebView :
WKWebView
- loadData:MIMEType:characterEncodingName:baseURL:
, (MS Word), UIWebView, WKWebView.