tags:

views:

47

answers:

2

Hello friends,

I have Text(http://www.mywebsite.com) in a view, in which i need to provide URL link, so that clicking on that one will take user to the browser.

How do i achieve it? Please provide your suggestions.

Thank you very much.

+1  A: 

Display the text using UIWebView

oefe
A: 

If you have your text as a UIButton add the following code to the touch-up-inside action:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.stackoverflow.com/"]];
Kevin Sylvestre
Thanks. I should keep url text in my application About screen, which does also has some other text too. So i don't think WebView is not good to add in About screen. As Kevin said, if we can keep this under a button, how can we have button without rectangle shape(so that it doesn't look like button) and show us text with underlined?
Hi. In interface builder, select your button and hit [command][shift][i] then change the type to 'custom' to remove the rectangle outline. As for the underline, I am not sure.
Kevin Sylvestre
What is with the down votes? Leave a comment please...
Kevin Sylvestre
Thanks Kevin. I don't know who has made down vote for your answer. I'll make that correct.
No worries, just thought it might not have worked, so I made a project and tested. Seems OK to me.
Kevin Sylvestre