I added an instance of UIMenuItem to the UIMenuController . When I double-click on a text field, I get this text editing menu using "Copy", "Cut", "Paste", "Search" on Wikipedia.
This is my action method:
- (void)lookupInWikipedia:(id)sender { NSLog(%@"lookupInWikipedia: sender=%@", sender); }
I get NSLog when I select the Wikipedia Search menu item. But the sender is always zero.
Even the -canPerformAction:withSender: method gets nothing but nil for the sender.
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender { NSLog(@"canPerformAction:withSender: = %@", sender); return YES; }
Am I doing something wrong or is this a knowledge base error?
source share