views:

18

answers:

1

I'm reading through TableView_iPhone tutorial from Apple http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/TableView_iPhone/TableViewCells/TableViewCells.html and I'm trying to use 'The Technique for Static Row Content' technique to populate TableView with cells from a nib file. In the tutorial the nib files have different heights and the TableView is showing them properly. When I return UITableViewCell from tableView:cellForRowAtIndexPath: the height of a cell from the NIB file is not taken and all cell have the same height. Is it possible that tableView retrieves the height automatically? Or am I missing something in the tutorial?

Is implementing tableView:heightForRowAtIndexPath: the only way to go?

A: 

Yes, you need to implement heightForRowAtIndexPath. It is called to quickly calculate heights of rows, withour creating them. So, you shouldn't perform any time-consuming operations in that heightForRowAtIndexPath.

Nickolay O.