I\'ve implemented a straight forward WKWebView
in iOS.
var refreshControl = UIRefreshControl()
refreshControl.addTarget(self, action: Sel
Just to say looking at this in Swift 3 and the answer from JAck helped me solve this issue:
in loadView()/viewDidLoad()
webView.scrollView.bounces = true
let refreshControl = UIRefreshControl()
refreshControl.addTarget(self, action: #selector(ViewController.refreshWebView), for: UIControlEvents.valueChanged)
webView.scrollView.addSubview(refreshControl)
and then a separate function
func refreshWebView(sender: UIRefreshControl) {
print("refersh")
//
sender.endRefreshing()
}
And I'm now seeing the refresh being printed.