Formatting and drawing text in a UITableViewCell ala Twitterrific for iPhone

I would like to have formatted, interactive text and images inside the selected UITableViewCell. An example of the functionality I'm looking for can be seen in the Twitterrific iPhone app. When the user clicks on a cell, the cell is highlighted and the various links become highlighted and viewable.

I've seen the idea of ​​using a UIWebView inside a UITableViewCell to handle formatting, but I'm not sure about that. Does this mean that each cell should have its own webview? I am wondering about the cost and performance of such a method. Is there any other way to get this functionality with Core Graphics?

I am currently using a custom drawing to draw my table cells as described in atebit's blog post on fast scrolling .

+2


source to share


2 answers


Craig Hockenberry, author of Twitterrific, recounted how he did it in 2008:

http://furbo.org/2008/10/07/fancy-uilabels/



Basically when a row is selected, it overlays the UIButtons where the links are. This is imperfect because sometimes the button does not fit in the same place as the text.

+2


source


The first thing I would like to do is check out twitter old source code . And see if this version does what you are looking for.

I'm not sure how Hockenberry does this, but usually UIWebviews + UITableViewCells! = Fast scrolling.



I am assuming each cell does NOT contain a UIWebview until you click on it when it quickly puts the UIWebview in the cell to handle the text formatting. Then you have a reusable UIWebview instance that you reuse but just change the content again.

+1


source







All Articles