title: UITableView Accessory Button Segue Not working
body: <p>I'm having big problems learning how to pass data from the cell accessory button to the detail view controller with segues.  If I tap the cell the data is passed to the detail view controller in a  <code>NSString *selectedItem;</code> and the label on the other view updates with the word that was in the cell - </p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
          {
      [self performSegueWithIdentifier:@"toDetail" sender:self];
          }
  
  - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
              if ([segue.identifier isEqualToString:@"toDetail"]) {
                  NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
                  DrugDetailViewController *destViewController = segue.destinationViewController;
                  destViewController.selectedItem = [[candyArray objectAtIndex:[indexPath row]] name];
              }
          }
  </code></pre>
  
  <p>And i connect a segue on the storyboard from the cell to the detail view with a name "toDeatil" It works when i click the cell it goes to the detail screen, but if i put</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
  {
  [self performSegueWithIdentifier:@"toDetail" sender:self];
      }
  
  - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
          if ([segue.identifier isEqualToString:@"toDetail"]) {
              NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
              DrugDetailViewController *destViewController = segue.destinationViewController;
              destViewController.selectedItem = [[candyArray objectAtIndex:[indexPath row]] name];
          }
      }
  </code></pre>
  
  <p>Almost exactly the same but from the <code>accessorybutton</code> and I connect a segue on the storyboard from the cell <code>accessorybutton</code> to the detail view with a name "<code>toDetail</code>" when I click the cell it goes to the detail screen, but the information is not there, the label dosent get filled out or just uses the first cell detail all the time.</p>
  
  <p>I've tried heaps of combinations.  I've tried making my own accessory button, a <code>UIButton</code> in a custom cell but it just uses the first cells details all the time.</p>
  
  <p>The goal is to get <code>didSelectRowAtIndexPath</code> going to one view and <code>accessoryButtonTappedForRowWithIndexPath</code> going to a different view but I need to tell <code>accessoryButtonTappedForRowWithIndexPath</code> what cell was pressed.</p>
  
  <p>Hope this makes sence.</p>
  
  <p>Thank you</p>