Trying To Call selectRowAtIndexPath Of My searchController.searchResultsTableView
<p>What I'm trying to do is call selectRowAtIndexPath in my searchResultsTableView.  I am doing this in my viewWillAppear so that the row gets selected after it comes back from another view controller.  In this simple example, I'm just asking it to go to row 2.  What happens is that it briefly selects row 2 and then the selection goes away.  Any ideas?</p>

<pre><code>-(void) viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];

    // just select row 2 as a test
    NSIndexPath *indexPath = [NSIndexPath indexPathForRow:2 inSection:0];
    [self.searchController.searchResultsTableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
    [self.searchController.searchResultsTableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionNone animated:NO];
}
</code></pre>

<p>Thanks</p>
