开发者

mobile safari and uiwebview has difference in detecting phone numbers

开发者 https://www.devze.com 2023-04-11 15:24 出处:网络
Am looking at a page in mobile safari which has a text 800 LUV-1234 inside html (no tel: link). This text is开发者_开发问答 automatically detected as phone number, but when i am seeing the same webpag

Am looking at a page in mobile safari which has a text 800 LUV-1234 inside html (no tel: link). This text is开发者_开发问答 automatically detected as phone number, but when i am seeing the same webpage with options like

self.webView.dataDetectorTypes = UIDataDetectorTypeAll;

it is not working properly. What could be wrong ? i thought this option alone will make the same text transformed to a detectable phone number. Do you have any other suggestions ?


It should work, the only thing I can suggest is that you ensure that self.webView is initialized and correctly points to the UIWebView instance. Are other data detector objects correctly detected in the UIWebView?

0

精彩评论

暂无评论...
验证码 换一张
取 消