Reputation: 3391
I'm trying to change the height of the cells in my TTTableViewController from the three20 library. I'm using TTTableRightImageItem and I want the height to be determined by the height of the image and not the fixed height.
Do I have to subclass TableCell? Is there a property I can just set?
Upvotes: 2
Views: 1281
Reputation: 1
Make sure that the UITableViewDelegate
that you create in the - (id<UITableViewDelegate>)createDelegate
method of TTTableViewController
is a subclass of TTTableViewVarHeightDelegate
.
A simple TTTableViewDelegate
won't call the + (CGFloat)tableView:(UITableView*) tableView rowHeightForObject:(id)item;
method of your custom cell.
Upvotes: 0
Reputation: 5174
Although probably late, but for anyone else searching set:
self.variableHeightRows = YES;
on your TTTableViewController and subclass the TTTableRightImageItem to implement
+ (CGFloat)tableView:(UITableView*) tableView rowHeightForObject:(id)item;
and return the cell height in float.
Upvotes: 1