views:

20

answers:

2

I have some text in a UITableViewCell that has a URL link to it. I'd like to make the URL blue and, when clicked, open up the Safari Browser. Some of suggested that I use a UIWebView within the UITableViewCell, but I've not seen a simple implementation of that. I don't care about scrolling as I only have one row in this table (it is a row that takes up the whole screen as I have lot of text in it). Anyone have any code for the cellForRowAtIndexPath method on how to implement this?

A: 

This is clearly a very bad place to use a tableview. That major point aside, you need to give us some more information. Does your cell contain more than one URL? Is(are) the URL(s) mixed in with non link text?

Honestly if you only have one cell, frankly, I see no reason to not just use a UIWebView.

Jerry Jones
A: 

Sure, here's more info. My table "normally" has many rows, but in the "error" case, there is only a single cell where I want to display text with a single URL mixed in with non link text (explaining to the user how to fix their error). So I've got my UITableView already in place and I want to display a link in one of the cells. Beyond this specific situation, I can see myself needing display links in other table cells in the future, so this would be good to know. Anyone have a code example that works?

Phamer