WKWebKit: No dataDetectorTypes parameter

Actually WKwebView doesn't have a dataDetectorTypes property. But In iOS 10 WKWebViewConfiguration has.

Try the following code snippet.

WKWebViewConfiguration *theConfiguration = [[WKWebViewConfiguration alloc] init];
theConfiguration.dataDetectorTypes = WKDataDetectorTypeNone;

WKWebView *webView = [[WKWebView alloc] initWithFrame:_someFrame configuration:theConfiguration];

This will work only from iOS10 onwards.


The cited article has been updated to reflect changes in the API between iOS 8 betas. As of 8.0.1, there is no dataDetectorTypes property on WKWebView, with no other comparable public API.

Until it's added back into the class, you'd have to implement this yourself with NSDataDetector, or resign yourself to using UIWebView.