title: Passing array to parent view controller in navigation-type app
body: <p>I need to pass an array to my parent view controller, and I'm not sure how to do that. Is my only choice to use a delegate? My application crashes at the line:</p>
  
  <pre><code>[self.parentViewController setrecipientItems:remoteRecipientItems];
  </code></pre>
  
  <p>with the message:</p>
  
  <blockquote>
    <p>[UINavigationController setrecipientItems:]: unrecognized selector sent to instance 0x8a10ab0</p>
  </blockquote>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  
  
  
      int newRow = [indexPath row];
      int oldRow = (lastIndexPath !=nil)?[lastIndexPath row]:-1;
  
      if (newRow != oldRow) {
          UITableViewCell *newCell = [tableView cellForRowAtIndexPath:indexPath];
          newCell.accessoryType = UITableViewCellAccessoryCheckmark;
  
          UITableViewCell *oldCell = [tableView cellForRowAtIndexPath:lastIndexPath];
  
          oldCell.accessoryType = UITableViewCellAccessoryNone;
  
          //  lastIndexPath = indexPath;
          lastIndexPath = [indexPath retain];
  
  
      }
  
      [tableView deselectRowAtIndexPath:indexPath animated:YES];
  
      // UIViewController may not respond to setrecipientItems: warning
      [self.parentViewController setrecipientItems:remoteRecipientItems]; 
  
      [[self.parentViewController.] ]
  
  
      [self.navigationController popViewControllerAnimated:YES];
  
  
  }
  </code></pre>
  
  <p>Also my parent UIViewController is set up like this:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  
  @interface AddRecipientsTableViewController : UITableViewController {
  NSMutableArray *recipientItems;
  }
  @property(nonatomic,retain)NSMutableArray *recipientItems;
  
  
  
  @end
  </code></pre>