Requirements:
I have a table and a button I need to place on my screen. The table can have zero to many rows. The button needs to be at least 40 pts below the bottom of the table content, and 83 pts above the bottom of the screen. So when there are only a few rows, the button is far away from the last row of the table, but when there are many rows, the button may not appear on the screen until the user scrolls down the table.
I have considered using a UITableView footer but it would always place the button right after the last row of the table content.
Right now I am considering using a UIScrollView and placing the table and button in a view that grows as the table content grows. The table height constraint would grow as well. I would use inequality constraint on button so it's always at least 40 pts below bottom of table and 83 pts above bottom of the view.
Is there a better way though? What I described seems a little complicated.
UI design of when the table is short:
I do not have a pic for when the table is long and scrolls off the screen, but button has spacing between last row and bottom of scrolled view