views:

821

answers:

2

It seems that you must use the TTThumbsViewController to accomplish this. However, in the example code, TTThumbsViewController is only ever used to manage a scrollview of thumbs. How do you configure it to display cells instead?

_______Original Question_______

Has anyone used the Three20 source and made a tableview (not Fields)?

I am trying to figure out how to insert the TTThumbTableViewCell in a table and it none of the examples even address the tableviewcell classes (just the tablefields).

If you know how to setup a table to use these cell classes, can you post how you accomplished it?

Thanks

+1  A: 

I haven't really used Three20 myself, but took a quick look on the source code.

It seems that Three20 have abstracted a creation of table view cells in generic TTTableViewDataSource. It queries class of a table view cell to be created via tableView:cellClassForObject:. TTThumbsDataSource in TTThumbsViewController.m then overrides that to return TTThumbTableViewCell class for TTPhoto objects.

So, if you are not using TTThumbsViewController, you should use TTThumbsDataSource as a dataSource for your table view or create your own similar class.

tequilatango
It seems that normally that cells are not created directly, rather through the use of fields. However, the photo cell is different and doesn't have an associated field type. So I have to figure out what to populate the TTThumbsDataSource with that says use "cells" not a "scrollvirew" (which is what the demo app does).
Corey Floyd
+1  A: 

I was mistaken in how Three20 was setup. A TTThumbsViewController is a Table view of TTThumbTableViewCells already. You just can't see the lines between the cells.

You can change the way the cells behave by subclassing TTThumbTableViewCells.

Corey Floyd