Naqeeb
Naqeeb

Reputation: 1411

Difference between UIWebView(deprecated) and webkit View in swift

I am starting learn webview in ios swift but i am unable to understand the difference between uiwebview and webview kit. recommend some article or documentation so that i can make it clear.

Upvotes: 1

Views: 2629

Answers (1)

Shubham Bakshi
Shubham Bakshi

Reputation: 572

UIWebView is deprecated and should not be used in apps and WKWebView is the replacement for that .

If you compare it performance wise, WKWebView outperforms UIWebView in case of memory consumption as UIWebView consumes a lot of memory to load the same webpage and WKWebView on the other hand does not consume that much. You can easily create a demo app and see for yourself

As per Apple Documentation

In apps that run in iOS 8 and later, use the WKWebView class instead of using UIWebView

So, to sum it up, if you want to load a webpage inside your app, you can use WKWebView

Also, not really what you asked for, but you should also look inside SFSafariViewController if you want some Safari related features such as Reader, AutoFill, Fraudulent Website Detection, and content blocking.

You can find more about SFSafariViewController

Upvotes: 2

Related Questions