Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iPhoneSpain

macrumors newbie
Original poster
Sep 27, 2009
28
0
Hi,

I have a textView which detects links and allows me to click on them. When I do so, current app is closed in order to open safari as usual. I want to load that url inside my app with an UIWebView so the app isn't closed when I click the link (that is kind of annoying!). How can I accomplish that??

Thanks!
 
Push a new view controller into the navigation stack. The view controller should be managing a UIWebView. When it becomes visible tell it to load the URL.

Unless there is something specific you are stuck with I don't really see what more you want? It seems like a very basic simple thing to do.
 
Yeah I guess it's very simple and I've already loaded UIWebViews into my app. The problem is that I do not know which method is responsible for detecting that I've clicked the link, capture it into a string 4 instance and so, the method where I have to push the new ViewController.

Do you understand me?
 
Yeah I guess it's very simple and I've already loaded UIWebViews into my app. The problem is that I do not know which method is responsible for detecting that I've clicked the link, capture it into a string 4 instance and so, the method where I have to push the new ViewController.

Do you understand me?

Ah, well that's the bit you said you have. I'm not seeing anything obvious in the documentation.
 
But I have seen lots of programs doing what I am trying to. I think it's very simple. I've come across lots of forums explaining how to detects links inside a UIWebView but I need that inside a textView in order to launch my UIWebView whenever the link is clicked.

No idea? :(
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.