Use single WKWebView in all UIViewControllers in UITabbarController iOS

30 Views Asked by At

I am working on UITabbarViewController application where I have 5 tabs. On Each tab, I have to show WKWebView with some URL. Now my problem is, If I perform any action on WKWebView in first tab then it should highlight or select the second tab with the updated URL. In short, how we can use same WKWebView with each and every tab.

Any suggestions.

Thanks in advance

1

There are 1 best solutions below

0
Onato On

Have a look through the VisitableView class in Turbo iOS.

When you tap on a link, it replaces the web view with a snapshot and puts it in a new view controller. It is moving the web view onto each new view controller as it is pushed onto a navigation stack.