views:

363

answers:

2

I'm working through the Stanford iPhone programming course online. The Presence app assignment pulls Twitter and displays each one in a separate UITableViewCell.

Updates often include URL's and I'd like to know how to display just the URL text in blue, having it be tappable. I can parse the text for URL's with no problem, just no idea how to display the URL itself.

Any advice or suggestions would be greatly appreciated.

A: 

You'll have to add a UIButton (or something similar) to the cell, with the button title being the URL and the action opening the actual link.

August
+1  A: 

As said above a button would work, but in terms of the UI it would probably look more natural if you had a label.

Alternatively, you could fill the UITableViewCell with a UIWebView. The UIWebView would hold all the text and you should easily be able to set part of the text as a link (color blue) using html.

zPesk