I\'ve simple UITableView with one section and few rows. When user clicks cell accessory button (which is connected with detailsSegue. I want to kno
As you have discovered, the system sends you the prepareForSegue:sender: message before it sends you the tableview:accessoryButtonTappedForRowWithIndexPath: message.
But, when it sends you the prepareForSegue:sender: message, the sender argument is the UITableViewCell containing the accessory view. You can use that to determine which row's accessory button was tapped:
else if ([segue.identifier isEqualToString:@"detailsSegue"]) {
NSIndexPath *indexPath = [self.tableView indexPathForCell:sender];
Annotation *annotation = [self.viewsList objectAtIndex:indexPath.row];
DetailsViewController *dvc = segue.destinationViewController;
dvc.wikiKey = annotation.title;
}