1. 程式人生 > >禁止textField和textView的複製貼上選單:

禁止textField和textView的複製貼上選單:

-(BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
     if ([UIMenuController sharedMenuController]) {
       [UIMenuController sharedMenuController].menuVisible = NO;
     }
     return NO;
}