title: Get the index path of last row in UITableView
body: <p>I have a <code>UITableView</code> with 1 section and <code>numberOfRows:</code> from <code>NSMutableArray</code>.</p>
  
  <p>What I want here is that whenever <code>UITableView</code> appears the scroll view must scroll to last row.</p>
  
  <p>For this I want <code>indexPath</code> of last row. How to get it?</p>
  
  <p>I know this question is answered many times. But none of those approaches worked for me.</p>
  
  <p>Here is the code I tried</p>
  
  <pre><code>-(NSIndexPath*)lastIndexPath{
       NSInteger sectionsAmount = [myTableView numberOfSections];
       NSInteger rowsAmount = [myTableView numberOfRowsInSection:sectionsAmount-1];
       NSIndexPath *lastIndexPath = [NSIndexPath indexPathForRow:(rowsAmount - 1) inSection:(sectionsAmount - 1)];
       return lastIndexPath;
   }
  </code></pre>