UITableView
is resized with constraints. It has 2 sections and the second section's header is resized inside tableView:heightForHeaderInSection:
:
headerHeight = tableView.frame.size.height - rowCount * oneRowHeight;
So when the table is resized this header should fill the empty space.
The problem is how to resize this if the table is already shown and constraints are changed later? If I try to get the frame - it returns incorrect value.
ADDED
Picture of I idea I need to achieve.
I have table from left with top and bottom constraints. Then I change the bottom constraint and it decreases the table height. I want to leave cells with the same size and decrease the size of the section header. How to achieve this?