I have the following code in my viewcontroller:
var webView: WKWebView!
@IBOutlet weak var containerView: WKWebView!
override func loadView() {
super.loadView()
webView = WKWebView()
containerView = self.webView!
}
override func viewDidLoad() {
super.viewDidLoad()
let requestURL = NSURL(string:url)
let request = NSURLRequest(URL: requestURL!)
containerView.navigationDelegate = self
containerView.loadRequest(request)
containerView.allowsBackForwardNavigationGestures = true
}
Basically I programmatically create a WKWebView and assign it to the storyboard UIView. This results in a blank page being shown. When I create the WKWebView without using the outlet it does work, but this is something I don't want. Any reason why this isn't working?