Reputation: 1403
In my application I am showing a UIMenuController
with menus share
, delete
, etc for a UITableViewCell
long press gesture.
It works perfectly, but after showing the menu, the default UIMenuController
of UITextfield
also has copy
, paste
, select
menu items.
How do I remove these 'standard' menu items?
Upvotes: 2
Views: 203
Reputation: 1658
Override the method of UITextfield as below
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
return NO;
}
Upvotes: 0
Reputation: 313
You should implement the method
- (BOOL)canPerformAction:(SEL)action
withSender:(id)sender
and return YES for actions you want and NO for actions you don't want.
Upvotes: 1