1

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 users stay in-app.

How can I achieve this?

Sheehan Alam
  • 60,111
  • 124
  • 355
  • 556
  • Perhaps this will be helpful: http://stackoverflow.com/questions/2543967/how-to-intercept-click-on-link-in-uitextview/4338011#4338011 – Purple Ninja Jul 20 '11 at 13:16

2 Answers2

0

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...

Morten Fast
  • 6,322
  • 27
  • 36
0

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 ;-) )

adamneilson
  • 758
  • 7
  • 9