Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
472 views
in Technique[技术] by (71.8m points)

iphone - How do you disable phone number detection in mobile safari

I have tried to disable phone number detection in safari for my web app but it still shows 7 character strings comprised of numbers as phone numbers. I used the apple provided meta tag but no joy.

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

Anyone else run into this problem and work around it?

Thanks.

Update: It looks like it does not detect phone numbers in safari but rather when I save the page as an icon and run it from the home screen.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Are you loading this in a UIWebView? If so, you need to set the property for dataDetectorTypes. e.g:

webView.dataDetectorTypes = UIDataDetectorTypeNone

Valid detector types are here.

Search for UIWebView on apple's site for a description of how to set the property there.

-Kevin


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...