Dynamiczna wysokość stołu nie jest ustawiona

Próbuję ustawić dynamiczną wysokość tabeli. Ale nie działa, gdy rejestruję wysokość stołu, która pokazuje mi dynamiczną wysokość, ale nie jest ustawiona na rzeczywistą tabelę.

Oto mój kod:

CGRect table_frame;
table_frame=table_sender.frame;
NSLog(@"table fram: %f",table_frame.size.height); //got table height 444
float height = [senderHistoryDataArray count]  * 40 +40 ; // 4*25.00
NSLog(@"height of table: %f",height);  //got this height 200
if(height>=444){
    table_frame.size.height=444;
}
else{
    table_frame.size.height=height;
    NSLog(@"height set");  //also displying this line in log
}

table_sender.frame=table_frame;
[table_sender reloadData];

Out Put:

po usunięciu zaznaczenia opcji autolayout będzie działać, ale pokazuje więcej części niż poprzednio.

questionAnswers(3)

yourAnswerToTheQuestion