I\'m trying to remove the default menu items from UIMenuController. I found this post for UIWebview or UITextView:
How to remove the default UIMenuItem from the UIM
The table view delegate method -tableView:canPerformAction:forRowAtIndexPath:withSender:
is for this purpose exactly.
Here is an example:
override func tableView(tableView: UITableView, canPerformAction action: Selector, forRowAtIndexPath indexPath: NSIndexPath, withSender sender: AnyObject?) -> Bool {
switch action {
case Selector("cut:"), Selector("copy:"), Selector("paste:"):
return false // as per your question
case Selector("myAction:"):
return true
default:
return false
}
}