Pull to refresh not working in iOS WebView

前端 未结 6 1926
野趣味
野趣味 2021-01-05 05:37

I\'ve implemented a straight forward WKWebView in iOS.

   var refreshControl = UIRefreshControl()
    refreshControl.addTarget(self, action: Sel         


        
6条回答
  •  迷失自我
    2021-01-05 06:23

    You have to enable bouncing for the scrollview of the webview:

    webView.scrollView.bounces = true
    

    This will let you drag the webview down which will trigger your UIRefreshControl.

提交回复
热议问题