I tried doing this:
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
return NO;
}
but it still pops up the menu, I also want to keep the copy, I just want to remove “define”, is this possible? To clarify I don’t want to remove the ability of text selection, I just wanted to remove the “define” option in the UIMenuController
Are you perhaps returning YES in canPerformAction:withSender further up in the responder chain?
Note that if your class returns NO for a command, another responder further up the responder chain may still return YES, enabling the command.