title: How to prepareForSegue using NSMutableArray?
body: <p>How to prepareForSegue using NSMutableArray?</p>
  
  <pre><code>NSMutableArray *theNews;
  </code></pre>
  
  <p>and this is prepareForSegue code</p>
  
  <pre><code>- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
  {
      if ([[segue identifier] isEqualToString:@"showDetail"]) {
          NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
          NSManagedObject *object = [[theNews objectAtIndex:indexPath.row] objectAtIndexPath:indexPath];
          [[segue destinationViewController] setDetailItem:object];
  
  
      }
  }
  </code></pre>
  
  <p>if i run the code i got this error:</p>
  
  <p>Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM objectAtIndexPath:]: unrecognized selector sent to instance 0x81c0f40'</p>