I've been having this error for quite a while now and I have no idea how to fix it. "Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value" That's the exact error code that pops up. I know this might be a simple fix but I can't figure out how to fix this at all.
Here is my code for the webView Kit.
import UIKit
import WebKit
class ViewController: UIViewController {
//webpage import
@IBOutlet weak var ParksView: WKWebView!
override func viewDidLoad() {
super.viewDidLoad()
let url = URL(string: "https://www.google.com")
let request = URLRequest(url: url!)
ParksView.load(request)
// Do any additional setup after loading the view, typically from a nib.
}
If someone could explain to me what I need to do to fix this problem, I would be forever grateful. Thank you!