Change UITableViewCell Height on Orientation Change

Posted by Peter Zich on Stack Overflow See other posts from Stack Overflow or by Peter Zich
Published on 2010-04-27T01:36:33Z Indexed on 2010/04/27 1:43 UTC
Read the original article Hit count: 505

I have a UITableView with cells containing variable-height UILabels. I am able to calculate the minimum height the label needs to be using sizeWithFont:constrainedToSize:lineBreakMode:, which works fine when the table view is first loaded. When I rotate the table view the cells become wider (meaning there are fewer lines required to display the content). Is there any way I can have the height of the cells redetermined by the UITableView during the orientation change animation or immediately before or after? Thank you.

© Stack Overflow or respective owner

Related posts about uitableviewcell

Related posts about orientation