开发者

iPhone:How to give URL link to the Text?

开发者 https://www.devze.com 2022-12-24 03:42 出处:网络
I have Text(http://w开发者_开发问答ww.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.

I have Text(http://w开发者_开发问答ww.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.


Display the text using UIWebView


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/"]];
0

精彩评论

暂无评论...
验证码 换一张
取 消