Guest User

Untitled

a guest
Apr 25th, 2012
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. display UIMenuController on tab on cell
  2. - (BOOL)tableView:(UITableView *)tableView shouldShowMenuForRowAtIndexPath:(NSIndexPath *)indexPath
  3. {
  4. return YES;
  5. }
  6.  
  7. - (BOOL)tableView:(UITableView *)tableView canPerformAction:(SEL)action forRowAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender
  8. {
  9. return (action == @selector(copy:));
  10. }
  11.  
  12. - (void)tableView:(UITableView *)tableView performAction:(SEL)action forRowAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender
  13. {
  14. if (action == @selector(copy:))
  15. NSLog(@"in real life, we'd now copy somehow");
  16. }
Advertisement
Add Comment
Please, Sign In to add comment