+2  A: 

It's less than optimal, but the simplest solution is to call -reloadData on the table.

A better solution would be to call -beginUpdates, -deleteRowsAtIndexPaths:withRowAnimation:, -insertRowsAtIndexPaths:withRowAnimation:, and -endUpdates or simply -reloadSections:withRowAnimation: if targeting 3.0 only. THis will add animation.

Edit: And you will also need a proper tableView:heightForRowAtIndexPath:

- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
    CGSize textSize = [[cell text] sizeWithFont:[UIFont systemFontOfSize:14] constrainedToSize:CGSizeMake([tableView frame].size.width - 20, 500)];
    return textSize.height + 13;
}
rpetrich
I tried -reloadData.
Alex Reynolds
I tried -reloadSections:withRowAnimation: in the -shouldAutorotateToInterfaceOrientation: method and this does not work, either.
Alex Reynolds
These all work if called after the view has been resized. That means they should be in your didRotateFromInterfaceOrientation:
rpetrich
Also, you appear to always be returning the same size. You should feed the width of the table into -sizeWithFont:constrainedToSize: rather that using a hard-coded CGSize
rpetrich
-didRotateFromInterfaceOrientation: does not work, either. Additionally, the CGSize parameter in -sizeWithFont:constrainedToSize: specifies the maximum possible size. The width of the cell is drawn correctly, but not the height.
Alex Reynolds
My point is you are returning the same height each time. The row won't change size if you don't provide a different value. For simplicity, return [tableView frame].size.width*0.25; to start, and then work from there
rpetrich
Okay, setting the CGSize width via [tableView frame].size.width seemed to help. Thanks!
Alex Reynolds
A: 

Nothing in your code seems to alter the height based on orientation. What change in height are you expecting?

Rob Napier
The cell content is multiline. In portrait orientation, the content is broken across four lines. In landscape orientation, the content is broken across two lines. Accordingly, in landscape orientation there is a larger gap between the top and bottom borders of the content and the edges of the enclosing cell.
Alex Reynolds
A: 

rpetrich, I tried to call cellForRowAtIndexPath from heightForRowAtIndexPath and I get a stack overflow. Using the debugger it seems that heightForRowAtIndexPath is called multiple times before cellForRowAtIndexPath.

I like the approach since the data in the cell is what should determine the height. Do you have any suggestions?

KingAndrew