Search code examples
htmliosobjective-cuiwebviewphone-number

Tell the iPhone this particular number is no phone number


this is probably a fairly easy question and I think it's more amusing than anything else, but I have a webView displaying a local HTML in which there is a ISBN number of a book, and the iPhone links it as a phone number and asks whether I'd like to call it.
How would I tell it to not use it as a phone number?

(The number is plain text inside a p-tag, it's not linked to amazon or so..)


Solution

  • Try this

    webview.dataDetectorTypes=0;
    

    or in your html set

    <meta name="format-detection" content="telephone=no">