禁止UITextView的copy,cut操作

-(BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
 
//       UITextView *text=(UITextView *)sender;
       [UIMenuController sharedMenuController].menuVisible = NO;   //donot display the menu
       [_textView resignFirstResponder];                                         //do not allow the user to selected anything

    return NO;

}

你可能感兴趣的:(禁止UITextView的copy,cut操作)