title: Anchor a UIButton to the bottom of a UITableViewController's view
body: <p>I have the following requirement. When a <code>UITableViewController</code>'s view is displayed, there are a variable number of rows. Underneath the rows, a button should be displayed.</p>
  
  <p>When the number of rows is small, the button should be anchored to the bottom of the view.</p>
  
  <p>When the number of rows is larger, the delete button should be placed immediately after the last row.</p>
  
  <p>In other words:</p>
  
  <p><img src="https://i.stack.imgur.com/cEhmt.png" alt="enter image description here"></p>
  
  <p>And not:</p>
  
  <p><img src="https://i.stack.imgur.com/7foSL.png" alt="enter image description here"></p>
  
  <p>My best attempt at this so far has involved setting a <code>tableFooterView</code> and trying to update its height using the <code>contentSize</code> of the <code>UITableView</code>, but I am running into all sorts of problems. I might continue down this path and ask for some help, but first I want to know if anyone has alternative (better) solutions.</p>
  
  <p>The result must play nicely with a double-sized status bar (during a call for example) and I am targeting iOS 6.0. I am not using interface builder.</p>