title: indexPathForSelectedRow returning nil
body: <p>I have a UITableViewController with a segue where I'm trying to get the currently selected row:</p>
  
  <pre><code>-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
      if([[segue identifier] isEqualToString:@"EditFilterElementSegue"]){
          // Get the element that was clicked and pass it to the view controller for display
          NSIndexPath *selectedIndexPath = [self.tableView indexPathForSelectedRow];
          Element *element = [fetchedResultsController objectAtIndexPath:selectedIndexPath];
          FilterElementTableViewController *vc = segue.destinationViewController;
          vc.filter = filter;
          vc.element = element;
      }
  }
  </code></pre>
  
  <p>The problem is indexPathForSelectedRow is returning nil.  The docs say nil is returned "if the index path is invalid".  If I add:</p>
  
  <pre><code>        [self.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:YES scrollPosition:0];
          selectedIndexPath = [self.tableView indexPathForSelectedRow];
  </code></pre>
  
  <p>selectedIndexPath is valid.  So, I'm currently assuming the row is somehow getting unselected.  Can anyone tell me how to figure out if this is the case and what might be causing it?</p>
  
  <p>This code worked fine until I converted to using NSFetchedResultsController (which otherwise is working).  I also use indexPathForSelectedRow in several other table view controllers where it works fine (one of which also uses NSFetchedResultsController).</p>
  
  <p>I've also tried breaking in didSelectRowAtIndexPath, but the same thing happens there. (expected since it's called after prepareForSegue.)</p>