I have the following code:
UIWebView.loadRequest(NSURLRequest(URL: NSURL(string: \"google.ca\")))
I am getting the following error:
You can load a page like this :
let url: URL = URL(string:"https://google.com")! webView.loadRequest(URLRequest.init(url: url))
Or the one-line approach :
webView.loadRequest(URLRequest.init(url: URL(string: "https://google.com")!))
webView is your outlet var.