I have another questions with WKWebView.
The following View is called with an request parameter which defines the complete url:
struct TrainerTab: UIViewRepresentable {
let request: String
private let hostingUrl: String = "https://page.tld"
func makeUIView(context: Context) -> WKWebView {
return WKWebView()
}
func updateUIView(_ uiView: WKWebView, context: Context) {
let url = "\(hostingUrl)/\(request)"
uiView.load(URLRequest(url: URL(string: url)!))
}
}
The HTML-Files from the page.tld have some href-Links. I would like to open them in Safari. I read, that I have to implement the delegate method that gets called when the user taps a link.
But how can I do this?