0
Wkwebview loads the link but I can’t perform any action on the site
Viewcontroller
import UIKit
import WebKit
class promoVC: UIViewController{
@IBOutlet weak var webView: WKWebView!
override func viewDidLoad() {
super.viewDidLoad()
webView.navigationDelegate = self
webView.loadURL(strURL: "https://rh.mazza.tech/web/guest/webuser");
}
}
extension promoVC : WKNavigationDelegate{
func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) {
print(error.localizedDescription)
}
func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {
print("Webview is loading")
}
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
print("")
}
}
Does your code compile? Wkwebview does not have a method called loadURL(String). The method is load(Urlrequest) https://developer.apple.com/documentation/webkit/wkwebview/1414954-load
– Rafael Leão
Compile, it opens the site, but I can’t use the site
– Paiva