Corey Floyd
Corey Floyd

Reputation: 25969

Three20 TTTableViewController with a TTThumbsTableViewCell

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

Upvotes: 1

Views: 1448

Answers (2)

Corey Floyd
Corey Floyd

Reputation: 25969

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.

Upvotes: 1

Teemu Kurppa
Teemu Kurppa

Reputation: 4849

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.

Upvotes: 1

Related Questions