WebPage lots two times underneath in Swift IOS App The use of WkWebView


I’m developing a swift ios app which is basically a webview of an webpage. Apart from this, it has a navigationitem as its topitem. It works according to the functionality but whenever I load the page the page comes twice one below the other.

Is it due to JavaScript of the webpage not loading correctly or cache not sure?

Simulator

Mobile device Browser

The website opens just fine on any mobile device browser.

// Custom method 
let url = URL(string : url)
let req = URLRequest(url: url)
> webView.load(req1)
ovverride func loadView(){
webView = WkWebView(frame: .zero, configuration: webconfig)
webView.uiDelegate = self
webView.navigationDelegate = self
view = webView
}
ovverride func viewDidLoad() {
// code for navigationitem
}

Leave a Reply

Your email address will not be published. Required fields are marked *