title: performSegueWithIdentifier from TableViewController to second TVC embedded in NavController not working
body: <p>I have two TableViewControllers with a segue in-between. When a user clicks on a cell in the first TVC they get presented with the second TVC. The segue is modal, has an identifier called "segueToLocationDetails" and passes an object along with it. You can think of the second TVC as a "details" page more or less. </p>
  
  <p>My code works perfectly in the scenario that I've described above. It breaks however as soon as I embed the second TVC into a navigation controller. </p>
  
  <p>Example. I have it working perfectly. I then highlight the second TVC in IB, mouse over to Product | Embed in | Navigation controller. Now the second TVC is in a Nav Controller. The segue however still points to the second TVC. I remove the segue and reconnect it from the first TVC's cell to the Navigation Controller and be sure give the segue an identifier. Run again, and it breaks! The error is below...</p>
  
  <blockquote>
    <p>2011-12-23 15:30:45.469 Project12[5219:11603] -[UINavigationController
    setDetailsObject:]: unrecognized selector sent to instance 0x7b92ce0
    2011-12-23 15:30:45.471 Project12[5219:11603] <strong>* Terminating app due
    to uncaught exception 'NSInvalidArgumentException', reason:
    '-[UINavigationController setDetailsObject:]: unrecognized selector
    sent to instance 0x7b92ce0'
    *</strong> First throw call stack: (0x16ea052 0x150ad0a 0x16ebced 0x1650f00 0x1650ce2 0x3933 0x703e1e 0x36f6d9 0x36f952 0xbf786d 0x16be966
    0x16be407 0x16217c0 0x1620db4 0x1620ccb 0x14ec879 0x14ec93e 0x2dfa9b
    0x2a98 0x29f5 0x1) terminate called throwing an exceptionCurrent
    language:  auto; currently objective-c</p>
  </blockquote>
  
  <p>Some code is below to help explain:</p>
  
  <p>AllLocations.h &amp; AllLocations.m (this is the master table)</p>
  
  <pre><code>AllLocations.h
  
  @interface AllLocations : UITableViewController
  {
      SQLiteDB *mySQLiteDB;
  }
  @property (nonatomic, strong) NSMutableArray *locationsArray;
  
  
  
  AllLocations.m
  
  - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
      [self performSegueWithIdentifier:@"segueToLocationDetails" sender:self];
  }
  
  - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
  {
      if ([[segue identifier] isEqualToString:@"segueToLocationDetails"]) 
      {
          NSIndexPath *selectedIndexPath = [self.tableView indexPathForSelectedRow];
          NSInteger rowNumber = selectedIndexPath.row;
  
          mySQLiteDB = (SQLiteDB *) [locationsArray objectAtIndex:rowNumber];
  
          DetailsTVC *detailsTVC = [segue destinationViewController];
  
          detailsTVC.detailsObject = mySQLiteDB;        
      }
  }
  </code></pre>
  
  <p>DetailsTVC.h &amp; DetailsTVC.m (this is the detailed table view)</p>
  
  <pre><code>DetailsTVC.h
  
  @interface DetailsTVC : UITableViewController
  
  @property (nonatomic, strong) SQLiteDB *detailsObject;
  
  
  DetailsTVC.m
  
  @implementation SpotDetailsTVC
  
  @synthesize spotDetailsObject;
  </code></pre>
  
  <p>Note: I left out all of the code that was not really important or relevant to the question.</p>
  
  <p>Again: This works perfectly if the segue goes from the Originating TableVeiwController to the other TableViewController. It only breaks when I embed the second TVC in a Nav Controller. I need to know how to get this working with the Nav Controller in the picture. Thanks in advance!</p>