title: swift UITableView set rowHeight
body: <p>I am trying to set the height of each row in the <code>tableView</code> to the height of the corresponding cell with this code:</p>
  
  <pre><code>override func tableView(tableView: UITableView!, heightForRowAtIndexPath indexPath: NSIndexPath!) -&gt; CGFloat {
        var cell = tableView.cellForRowAtIndexPath(indexPath)
        return cell.frame.height
  }
  </code></pre>
  
  <p>I get this error when initialising <code>var cell</code> : </p>
  
  <blockquote>
    <p>Thread 1:EXC_BAD_ACCESS(code=2,address=0x306d2c)</p>
  </blockquote>