I'm trying to make a web view to load an URL.
import UIKit class ViewController: UIViewController, WKNavigationDelegate{ @IBOutlet weak var webView: WKWebView! @IBOutlet weak var statusLabel: UILabel! @IBOutlet weak var activityIndicator: UIActivityIndicatorView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } @IBAction func loadButtonPressed(_ sender: UIButton) { if let url = URL(string: "https://www.google.com") { let urlRequest = URLRequest(url: url) webView.load(URLRequest) } } } It shows Use of undeclared type 'WKNavigationDelegate'. I can't find what's go wrong. How can I fix it? Do I miss something?