Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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..)

like image 326
Nareille Avatar asked Jan 27 '26 12:01

Nareille


2 Answers

Try this

webview.dataDetectorTypes=0;

or in your html set

<meta name="format-detection" content="telephone=no">
like image 131
Muhammad Zeeshan Avatar answered Jan 30 '26 00:01

Muhammad Zeeshan


You can use the dataDetectorTypes property of UIWebView and tell it to not identify phone numbers. This would only be in the case that your HTML doesn't have any actual phone numbers which you want clickable from within the web view.

like image 22
lostInTransit Avatar answered Jan 30 '26 02:01

lostInTransit



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!