The sender you use to prepare for segue can be anything you want. If you want to know a string, send a string or a pointer path:
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath { NSUInteger rowNumber = [indexPath row]; NSString *categoryCode = [self.categoryCodes objectAtIndex:rowNumber]; self.categoryData = [self.commuterDict objectForKey:categoryCode]; [self performSegueWithIdentifier:@"ShowPlaces" sender:indexPath]; } - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"ShowPlaces"]) { PlacesViewController *placesViewController = [segue destinationViewController];
If you want to use the actual string do that sender
[self performSegueWithIdentifier:@"ShowPlaces" sender:[tableView cellForRowAtIndexPath:indexPath]];
source share