tags:

views:

39

answers:

1

Hi Experts,

I'm using the three20 framework and added a TTListDataSource, but I want to change the hight of each Cell (optimal would be the high the text takes inside, so that nothing is cut).

I changed some values at Three20UI/TTTableSubtitleItemCell.h to change the inner high is no problem, but the dividing line is not accordingly

regards

+2  A: 

TTTableViewCell has a class method, that calculates the height of each table row. It's called tableView:rowHeightForObject:. If you are using a custom subclass of TTTableViewCell you need to override this method to return the height you wish. The standard cells will automatically calculate the height base on the cells content.

To use that feature you have to set variableHeightRows to YES on the TTTableViewController.

You cannot change the height of a tableCell from within the cell. The reason is, that a table needs to know the size of it's cell before it's actually created. Without Three20 you would have to use the UITableView delegate to set row heights.

tonklon