Copy/Paste functionality in UITableViewController.
- by Simon
Hi.. I have a UITableViewController. I want to pop the copy/paste menu up when the user touches a cell. How to implement this functionality. Can someone help me.
I tried this code,
UIMenuController *theMenu = [UIMenuController sharedMenuController];
[theMenu setTargetRect:CGRectMake(10, 200, 100, 40) inView:[self tableView]];
[theMenu setMenuVisible:YES animated:YES];
But it doesn't work. My question is,
What CGRect I have to pass as the setTargetRect parameter?
Do I need to call SetNeedsDisplayInRect in my TableViewController?
What else to do to make this work?