2

In order to prevent "Define" as well as other menu items from showing when tapping on a textfield, i basically return NO for the canPerformAction:withSender method for each action. This works perfectly accept for one problem in preventing the "Define" menu item from showing up. I have to use _define: which is not allowed in the rules because it has an underscore and therefore is deemed a private api reference and therefore the IOS app will get rejected. It works but i cannot use it. The other menu items such as Copy, Select, etc. don't require underscore. What to do? Below is a code snippet containing "define" which works perfectly but i cannot use it.

...

 else if (action == @selector(paste:)) {
     retValue = NO;
 }
 else if (action == @selector(_define:)) {
     retValue = NO;
 }
 else {
     retValue = [super canPerformAction:action withSender:sender];
 }

...

4

0 に答える 0