title: How to make a table view fill entire view pragmatically in swift
body: <p>I am trying to make a UITable View fill the entire view with the options I supply. As of now I have four options. This is the code I am running: </p>
  
  <pre><code>func tableView(tableView: UITableView,
      heightForRowAtIndexPath indexPath: NSIndexPath) -&gt; CGFloat {
          if indexPath.row == 1 {
              return (screensize.height-70)/4 //Whatever fits your need for that cell
          } else {
              return (screensize.height-70)/4 // other cell height
          }
  }
  </code></pre>
  
  <p>The 70 comes from the navigation bar I have at the top of my page which takes 70 pixels. My problem is that no matter what I get some sort of white space buffer at the bottom of the simulator. Even with hard coded values I don't seem to be able to fill the display. It will display the first 3 options and then you'll have to scroll for the fourth. Please help. </p>
  
  <p>UPDATE: To set the table dimensions I used: </p>
  
  <p>tableView.frame        =   CGRectMake(0, 71, screenSize.height-70, screenSize.width);</p>