ios7 - How to remove paste from UIMenuController? -
i have added own menuitem uimenucontroller.but problem is showing default items copy, paste etc. want remove these items , want display own menu item. have tried code
- (bool)canperformaction:(sel)action withsender:(id)sender { bool can = [super canperformaction:action withsender:sender]; if (action == @selector(showmyalert:) ) { can = yes; } if (action == @selector(paste:)) { can = no; } return can; }
you may subclass uitextview
or uitextfield
, , add these code below.
- (bool)canperformaction:(sel)action withsender:(id)sender { // show own menu item return (action == @selector(showmyalert:)); }
Comments
Post a Comment