开发者

iPhone:How to give URL link to the Text?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜