title: Modal segue needs 2 clicks instead of one
body: <p>My UITableView needs 2 clicks to show the detail page of the selected cell : one for selection and another one for show the detail view. I would like one clic to directly show the detail view of the clicked cell.</p>
  
  <p>I use a modal segue with this method inside my UITableViewManager.m :</p>
  
  <pre><code>    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
  {
      if ([[segue identifier] isEqualToString:@"showDetail"]) {
          NSIndexPath *indexPath = [playerList indexPathForSelectedRow];
          TCPlayerStat *object = _objects[indexPath.row];
          [[segue destinationViewController] setPlayerStat:object];
      }
  }
  </code></pre>
  
  <p>I can't work with a push segue because I don't have Navigation Controller (and don't really want to).</p>
  
  <p>I've looked in the TableView Attribute Inspector but didnt find out anything relevant for this. I have Selection "Single Selection" selected and "Show Selection on Touch" checked.
  I don't know if this is possible and if it is, where to look..</p>
  
  <p>Thanks for your help.</p>
  
  <hr>
  
  <p>EDIT 1: When I write the two methods like this, it still doesn't work (needs 2 clicks) and I have a new warning log:</p>
  
  <blockquote>
    <p>"Warning: Attempt to present TCDetailViewController: 0xa27b900 on
    TCRootViewController: 0xa24f050 while a presentation is in progress!"</p>
  </blockquote>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
      [self performSegueWithIdentifier:@"showDetail" sender:self];
  }
  
  - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
  {
      if ([[segue identifier] isEqualToString:@"showDetail"]) {
          NSIndexPath *indexPath = [playerList indexPathForSelectedRow];
          TCPlayerStat *object = _objects[indexPath.row];
          TCDetailViewController *detailViewController = [segue destinationViewController];
          [detailViewController setPlayerStat:object];
      }
  }
  </code></pre>
  
  <hr>
  
  <p>EDIT 2: I don't know why, but sometimes it works perfectly and doesn't need a second click on the table view. Can't find out :/</p>
  
  <hr>
  
  <p><strong>Solution below</strong></p>