views:

204

answers:

1

So this is a really simple question, I just can't find the answer. 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? Thanks

+1  A: 

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.

Brandon Bodnár
Hey thanks for your answer, how do I set it as a link though? DO I need to do something programmatically?
Steve
I am fairly certain that anything with http:// in front of it is detected as a link. If you are looking for making a normal word a link, I don't think that is supported in UITextView.
Brandon Bodnár
I apologize, that is what I am looking for, making a normal word link to a website. Is that supported in a UILabel? Thanks
Steve
If you need to be able to make a normal word a link, then I would use a UIWebView instead which you can fill with regular HTML.
Brandon Bodnár