title: Removing "Define" from UISearchBar
body: <p>I wish to remove the "Define" option from the menu of a UISearchBar that I have placed in my view's nib file. </p>
  
  <p>As widely suggested, I subclassed UISearchBar and then overrode <code>-(BOOL)canPerformAction:(SEL)action withSender:(id)sender</code> to return YES only for cut, copy and paste options.  I then set the custom class of this UISearchBar to the subclass I created, in the nib file. </p>
  
  <p>The method is indeed called, but doesn't work as intended. When I set a breakpoint, and monitor for which actions it is called, it's called for <code>define:</code> only on a few occasions (yes, just randomly - it might come up on one run, and might not on the other). Even when it is called for <code>define:</code>, and a NO is returned, the "Define" option turns up on the menu. </p>
  
  <p>Is there any way I can fix this? The deployment target for the app is iOS 7. </p>