How can I over-ride the UITextView link detection?
I have a UITextView that is auto-detecting link URL's. Instead of opening it in Safari, I want to present my own modal view controller that contains a webview so my开发者_Python百科 users stay in-app.
How can I achieve this?
I don't think you can.
Where a UIWebView will tell its delegate when a link is tapped, a UITextView doesn't provide that kind of info.
You could use a UIWebView instead of a UITextView, but that's a workaround...
By all accounts this is possible with the following:
- (void)webView:(id)fp8 decidePolicyForNavigationAction:(id)fp12 request:(id)fp16 frame:(id)fp20 decisionListener:(id)fp24;
Credit goes to Muthu.chidambar here http://forums.macrumors.com/showthread.php?t=745879 (if it works that is ;-) )
精彩评论