Search code examples
iphonehtmluiwebview

How to disable lonpress in a UIWebview on iPhone?


I am using a UIWebview to display local .html. I want to disable longpress in this view. How would I go about executing this?

Here is what fixed it:

<style media="screen" type="text/css">

body {
  -webkit-touch-callout: none;
}
</style>

Solution

  • Add this to your CSS:

    body {
      -webkit-touch-callout: none;
    }