views:

707

answers:

2

I have a UIWebView with detect phone numbers unchecked. However, it keeps underlining the numbers in this text:

Version: 2.1 3.19.2009

The text isn't in an anchor or anything. Is there a way to force the UIWebView to not detect phone numbers?

+4  A: 

It looks like there is a problem with Interface Builder's UIWebView attributes palette; the "Detects Phone Numbers" checkbox does not seem to have any affect. Examining the UIWebView's detectsPhoneNumbers property at runtime shows that it was not actually modified by IB.

For now, setting the detectsPhoneNumbers property in code to "NO" will work fine. The problem is only with the IB palette.

Unless we're both missing something, this is a bug. I'd suggest filing it at http://bugreport.apple.com/. Additionally, you can post it at http://openradar.appspot.com/ if you'd like to make it visible to other developers.

Sean Murphy
Strange - this doesn't work [mywebview detectsPhoneNumbers:NO] but this does mywebview.detectsPhoneNumbers = NO. Thanks.
4thSpace
You're welcome :). Note that When using bracket notation, you'll actually have to call [myWebView setDetectsPhoneNumbers:NO]. A property's accessor methods themselves take on standard getter and setter names.
Sean Murphy
+2  A: 

Try

webview.dataDetectorTypes=0;

It worked for me...

Thanx

Suriya
me too... thanks
MobiHunterz