In the xib with your tableview, you can add a cell object and link it to an IBOutlet in your source-code. You won't use it anywhere, you will just use this to get the height of the cell.
Then, in tableView:heightForRowAtIndexPath:
you can use that object to get the height. It's not 100% automatic, but at least this saves you the trouble to manually update your source code when you make changes in the cell view in IB.
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return myDummyCellObject.bounds.size.height;
}
If all rows are of the same type (cell) you can programatically set the tableView.rowHeight
property instead of implementing the delegate method above. Depends on your scenario.
Oh, and make sure you don't forget to release myDummyCellObject in -dealloc
.