Disabling visible links in UIWebView

前端 未结 3 1653
醉酒成梦
醉酒成梦 2021-01-22 21:31

I have a number of web views in my app in which I need to be careful about allowing further HTML links.

I disallow links in the delegate method shouldStartLoadWithRequ

3条回答
  •  长情又很酷
    2021-01-22 22:24

    For swift 3:

    Try removing the types you don't want to show as link from webView.dataDetectorTypes

    webView.dataDetectorTypes.remove(UIDataDetectorTypes.all)
    

提交回复
热议问题