Search code examples
iosswiftuiwebview

How to refresh a webViewController when user wants to refresh it not automatically when navigating from one tab to other


I have a webViewController on two tabs, as i navigate from one to the other it will always refresh.

Is there a way to not let the webView Refresh when navigating to it again until the user wants it refreshed?


Solution

  • Did you called LoadRequest function in the viewWillAppear? If yes, please try to call that function in viewDidLoad. And call that again when user tap on the refresh button. Hope this helps.