All rows but the last are the same height in the table. If we forget that last row, in normal circumstances I’d set the table view’s height like so:
[self.tableView setRowHeight:40.0f];
However if I want the last row to be a different height, I’d implement the delegate method heightForRowAtIndexPath which would then be called for all index paths. This seems quite expensive and could effect performance for >1000 rows of data.
I don’t see any other way, but will remain optimistic until I get feedback.
Implement footer view for the table and implement the delegate,
Check if the footer view can satisfy your requirement. If you cannot use footer view, you might have to implement the table view’s delegate method for setting row height as mentioned in your question. It will not cause any performance hit unless you do some expensive operation there.