Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set text in a UITextView as a link to a URL

I have some text in a UITextView, that I would like to have show as blue, and serve as a link to a website. How do I do that in interface builder?

like image 890
Steve Avatar asked Mar 22 '10 03:03

Steve


1 Answers

In Interface Builder, select the UITextView, open the inspector, go to the Text View Attributes tab, then make share "Detect Links" is checked.

This only works for items that look like links (http://stackoverflow.com)

For making arbitrary links, then you will want to use a UIWebView instead.

like image 101
Brandon Bodnar Avatar answered Oct 06 '22 01:10

Brandon Bodnar