Alex Rivera | Logout

Prevent iOS Webkit Long Press on Link

Asked 2012-02-04T22:16:27.153
25

In an iOS app I'm developing, I show an UIWebView to allow the user to upgrade their account. The page contains links to show the user other informations, but you hold your finger on the link, a menu like this will pop up: enter image description here

As you can see, it reveals the URL of the page and the action that will be performed, which I do not want the user to see, since I don't want them to be able to copy anything as I disabled the "Copy/Cut/Paste" menu already. How would I go about disabling this menu as well?

Thanks for any pointers.

Edit
Report

1 Answer

43

I think you can disable that popup by setting the CSS -webkit-touch-callout property to none on the link. You would do this by editing the HTML or CSS file you're loading, not using Objective-C.

answered 2012-02-04T22:40:40.297

Your Answer