Skip to main content

Posts

Showing posts with the label uimenucontroller

display UIMenuController on tab on cell

I have uitableview I want to display UIMenuController when I tab on cell such that if the content of the cell is text the menu show edit , send by mail else listen, send by mail adn hide it it if I leaved it or tab away of it, something like right click context menue any idea how to achieve that I did something like that - (BOOL)tableView:(UITableView *)tableView shouldShowMenuForRowAtIndexPath:(NSIndexPath *)indexPath { return YES; } - (BOOL)tableView:(UITableView *)tableView canPerformAction:(SEL)action forRowAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender { return (action == @selector(copy:)); } - (void)tableView:(UITableView *)tableView performAction:(SEL)action forRowAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender { if (action == @selector(copy:)) NSLog(@"in real life, we'd now copy somehow"); } but I need to customize the menu itself, and also implementing those thre methods doesn't show anything Best regards