I'm building my own custom Edit Menu (UIMenuController) and am using the typical
-(BOOL)canPerformAction:(SEL)action withSender(id)sender
method to conditionally enable / disable system defaults. The typical edit methods are well documented (copy:, cut:, etc.), but I can't find anything about what method is called by the "Define" menu option to pull up the new word dictionary in iOS 5. Maybe it's hiding in plain sight, but I've spent hours looking for it, so I'd appreciate any help. Specifically, I need:
if (action == @selector(defineWord:)) ......
but give me what really goes in the place of "defineWord:"
ps - I wouldn't mind knowing what class the method belongs to, just out of curiosity (copy: belongs to UIResponderStandardEditActions, for example)
By implementing this:
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
NSLog(@"%@", NSStringFromSelector(action));
}
I was able to see that the selector is "_define:".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With