mardi 31 octobre 2017

iOS WKWebView Swift javascript enable

I'm trying to do develop simple app to browse my website. However my website contains some javascript and it doesn't successfully show my website.

In the past develop with android the same app and had to activate like this: webSettings.setJavaScriptEnabled(true);

This currently my code I just have missing the option to enable javascript if somebody can help will really appreciate

import WebKit

class ViewController: UIViewController {

@IBOutlet weak var webView: WKWebView!




override func viewDidLoad() {
    super.viewDidLoad()
    let url = URL(string: "http://ift.tt/2iQprad")
    let urlRequest = URLRequest(url: url!)

    webView.load(urlRequest)



}

}




Aucun commentaire:

Enregistrer un commentaire