Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does last cell's height of UITableView get used for remaining empty cells?

My cells all have varying heights, determined by text entered by the user.

Whatever height the last cell takes on seems to determine (change) the height for all remaining blank cells.

It doesn't appear that heightForRowAtIndexPath is getting called for these remaining, empty cells, nor is CFRAIP.

Does anyone know how to fix this or why it is happening?

like image 793
Jason C. Howlin Avatar asked Dec 16 '22 13:12

Jason C. Howlin


1 Answers

Put this code in viewDidLoad of the the viewController where Tableview is placed.

self.tableView.tableFooterView = [[UIView alloc] init];

like image 145
Rajan Balana Avatar answered May 26 '23 03:05

Rajan Balana