views:

121

answers:

0

Hello, i have a Problem getting the right height for my tablecell with a given string.

Okay, here i am:

I have a custom Tablecell with 3 Labels (3 Lines), the labels are autoresizing (Because of changing orientation)

on viewWillAppear i load my data (i have to do it here, dont ask) and redraw the tableview

but before i could know how my labels are resized (Looking forward to IPad) i am asked - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath

but i cant give back the right height of the cell, because i dont know what the resized width will be. If i reload the table on viewDidAppear the cell height fits after a second, but thats bad. How can i let the tableview layout it subviews in background, so that the height will fit? Or something like that.

Thank you