First you need to implement (this is another call from a specific selection string)
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
inside it you use the following code:
UIMenuController *menuController = [UIMenuController sharedMenuController];
AddRouteMenuItem *menuItem = [[AddRouteMenuItem alloc] initWithTitle:@"Add to push list" action:@selector(addRouteMenuButtonPressed:)];
menuItem.indexPath = pressedIndexPath;
menuController.menuItems = [NSArray arrayWithObject:menuItem];
[menuItem release];
[menuController setTargetRect:[self.tableView rectForRowAtIndexPath:pressedIndexPath] inView:self.tableView];
[menuController setMenuVisible:YES animated:YES];
You clicked the index path = indexPath
-
- (void) setTargetRect: (CGRect) targetRect inView: (UIView *) targetView