I've created a progressView and linked it like this:
And here is what I do in my view controller:
class ViewController: UIViewController, WKNavigationDelegate, WKUIDelegate {
@IBOutlet weak var progressView: UIProgressView!
@IBOutlet weak var KronosWebsite: WKWebView!
override func loadView() {
//initialize the webview
progressView = UIProgressView()
progressView.progress = 1.0
KronosWebsite = WKWebView()
self.view = KronosWebsite
self.view.addSubview(progressView)
}
}
And I've got
Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional
in this line progressView.progress = 1.0