How to automatically size a table's footer view

Hi,

I would like to automatically vertically size the table's footer view so that it has a fixed pre-defined minimum height and maximum height that fills up the gap between the last cell and the bottom of the safe area. How can I do this?

PS: It seems to be that the footer view's size is not included in the table view's content size, correct?

Regards, Hardy

Hello @skywind ,

Feel free to share your code so that we can see exactly what you are doing.

What you may be noticing is that tableFooterView does not size itself with Auto Layout. Its height must be set yourself in viewDidLayoutSubviews. You might need to call tableView.setNeedsLayout() after any reloadData() instance method calls.

For more information see tableFooterView

 Travis

How to automatically size a table's footer view
 
 
Q