开发者

how to detect any Link in HTMLString in webView? (Iphone)

开发者 https://www.devze.com 2023-03-18 04:10 出处:网络
if i want that i can detect the link appeared in my HTMLstring in webView...how can I do it? I know in IB As we checkmark 开发者_如何学JAVAthe box of auto detectable link... but I want to know progra

if i want that i can detect the link appeared in my HTMLstring in webView...how can I do it?

I know in IB As we checkmark 开发者_如何学JAVAthe box of auto detectable link... but I want to know programatically


Did you check the dataDetectorTypes property?

For example use this:

[[self content] setDataDetectorTypes: UIDataDetectorTypeAll];

You could use:

UIDataDetectorTypePhoneNumber
UIDataDetectorTypeLink
UIDataDetectorTypeAddress
UIDataDetectorTypeCalendarEvent
UIDataDetectorTypeNone
UIDataDetectorTypeAll

Reference-Link UIWebView

0

精彩评论

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

关注公众号