Gesture recognition with UIWebView

前端 未结 6 1387
孤街浪徒
孤街浪徒 2021-02-04 10:58

I have set up some gesture recognition in an app that I\'m building. One of the gestures is a single finger single tap, which hides the toolbar at the top of the screen. Works g

6条回答
  •  滥情空心
    2021-02-04 11:38

    You can use the UIWebViewDelegate protocol's -webView:​shouldStartLoadWithRequest:​navigationType: method.

    If the navigationType is UIWebViewNavigationTypeLinkClicked, you can get the URL for the click by checking [request URL].

提交回复
热议问题