// 继承UITextView重写这个方法
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
// 返回NO为禁用,YES为开启
// 粘贴
if(action ==@selector(paste:))returnNO;
// 剪切
if(action ==@selector(cut:))returnNO;
// 复制
if(action ==@selector(copy:))returnNO;
// 选择
if(action ==@selector(select:))returnNO;
// 选中全部
if(action ==@selector(selectAll:))returnNO;
// 删除
if(action ==@selector(delete:))returnNO;
// 分享
if(action ==@selector(share))returnNO;
return[supercanPerformAction:action withSender:sender];
}