title: How do i automatically scroll in a table view? (Swift)
body: <p>I added a search bar to my table view, and as the user searches, I want the table view to scroll to the text that your typed.</p>
  
  <p>How do I make the scroll view scroll automatically?</p>
  
  <p>This is what I tried, but I get an error saying that an Integer is not convertible to an index Path. What should I do?</p>
  
  <pre><code>self.tableview.scrollToRowAtIndexPath(1, atScrollPosition: UITableViewScrollPosition.Middle, animated: true)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>self.tableview.scrollToNearestSelectedRowAtScrollPosition(scrollPosition: UITableViewScrollPosition.Middle, animated: true)
  </code></pre>