WkWebView search url in textField and show in WKwebview

hello there. i am new to Xcode and app development. i been working on a simple web browser for getting started on the program but ran into a problem. i want to add a textfield were i can input a url or a a search term in the bar. but how would that work. would it be a "  @IBOutlet" with the text bar and then have it input as url in the wkwebview.

here is the start of my code.



import Cocoa

import WebKit

class ViewController: NSViewController {

    @IBOutlet weak var webView: WKWebView!

    let url = "-----"

    override func viewDidLoad() {

        super.viewDidLoad()

        // Do any additional setup after loading the view.

        let request = URLRequest(url: URL(string: url)!)

        webView.load(request)

    }

}
WkWebView search url in textField and show in WKwebview
 
 
Q