How to load a URL in a WKWebView in Swift?

Loading a URL in a WKWebView in Swift is quite similar to loading it in a UIWebView. Here’s how to do it: In the above code, we first import the WebKit framework and declare a WKWebView instance as a class variable. Then, in the viewDidLoad method, we create the WKWebView, set its navigationDelegate to self, … Read more