Adjust UITableView height dynamically
问题 How can I adjust the UITableView height dynamically? Let's say I have 3 rows and each row has a height of 65. When a new row is added to the UITableView i want it to adjust it's height dynamically to fit the new row. And vice versa when a row is deleted to shrink. 回答1: Edit : Misread The thing depends on the (height of table cell row * number of rows in table) as the tableview.frame.size.height. Well I would suggest something like this.. -(void)correctHeight { //Note : if all cells are having