title: UITableView scroll to the bottom messed up with EstimatedRowHeight
body: <p>I'm trying to scroll to the bottom of my UITableView (commentsFeed) whenever the user creates a new comment or the user refreshes the UITableView.</p>
  
  <p>The code I use is:</p>
  
  <pre><code>func scrollToBottomOfComments() {
  
      var lastRowNumber = commentsFeed.numberOfRowsInSection(0) - 1
      var indexPath = NSIndexPath(forRow: lastRowNumber, inSection: 0)
      commentsFeed.scrollToRowAtIndexPath(indexPath, atScrollPosition: .Bottom, animated: true)
  }
  </code></pre>
  
  <p>The problem is here in <code>viewDidLoad</code>:</p>
  
  <pre><code>commentsFeed.rowHeight = UITableViewAutomaticDimension
  commentsFeed.estimatedRowHeight = 150
  </code></pre>
  
  <p>This basically states that the comments can have dynamic heights because users could post either really long comments or really short comments.</p>
  
  <p>When I use the estimatedRowHeight, my <code>scrollToBottom</code> doesn't properly scroll to the bottom because it basically assumes my table height is <code>commentsFeed.count * commentsFeed.estimatedRowHeight</code></p>
  
  <p>This isn't correct though.</p>
  
  <p>When I remove the <code>estimatedRowHeight</code> though, it doesn't seem to work either, and I think the reason is because it doesn't have the row height calculated properly because the rows each have dynamic heights.</p>
  
  <p>How do I mitigate this?</p>
  
  <p><strong>Edit: It should be stated that the scroll doesn't end up at the right position, but the moment I use my finger to scroll anywhere, then the data jumps into place where it should have been via the scroll</strong></p>