iPhone SDK - 在Web视图中打开UITextView中的链接 [英] iPhone SDK - opening links in a UITextView in a web view
本文介绍了iPhone SDK - 在Web视图中打开UITextView中的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在UITextView上指定了dataDetectorTypes,以便在触摸时在Safari中打开URL。
I have specified dataDetectorTypes on a UITextView so that URLs open in Safari when touched.
是否可以拦截此行为,因此我在UIWebView中加载URL ?或者我是否会编写自己的URL检测器代码来重新路由它?
Is it possible to intercept this behaviour so I load the URL in a UIWebView instead? Or would I have write my own URL detector code to re-route this?
推荐答案
您必须自己进行URL检测点击URL时手动加载UIWebView。
You would have to do the URL detection yourself and manually load the UIWebView when the URL is tapped.
所有内容都需要自定义,因为Apple发送所有 http://
和 https://
开启Safari的网址。
Everything needs to be custom-done because Apple sends all http://
and https://
URL openings to Safari.
这篇关于iPhone SDK - 在Web视图中打开UITextView中的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文