Month: November 2016

  • WKWebView Example

    Reference: https://developer.apple.com/reference/webkit/wkwebview Sample Code: import UIKit import WebKit class ViewController: UIViewController , WKNavigationDelegate { var webView : WKWebView! override func viewDidLoad() { super.viewDidLoad() let adreq = “https://g.adspeed.net/ad.php?do=html&zid=xxxx” let url = NSURL(string: adreq) let request = NSURLRequest(URL: url!) webView = WKWebView(frame: self.view.frame) webView.navigationDelegate = self webView.loadRequest(request) self.view.addSubview(webView) self.view.sendSubviewToBack(webView) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } //…