貌似只有UITextView 和UITextFiled两种控件自带拷贝功能,若是只要拷贝或者全选等单个功能,需要子类化-----必须子类化
//uiTextView
自带的有拷贝,复制粘贴的功能
- ( BOOL )canPerformAction:( SEL )action withSender:( id )sender{
if (action == @selector (copy:))//只要拷贝功能,屏蔽其他功能
{
return YES ;
}
else {
return NO ;
}
}
- ( void )copy:( id )sender
{
[ self resignFirstResponder ];
[ self userDownloadApkAOS ];
// 跳转到 AppStore 的搜索界面
[[ UIApplication sharedApplication ] openURL :[ NSURL URLWithString :[ NSString stringWithFormat : @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/search?id=" ]]];
- ( BOOL )canPerformAction:( SEL )action withSender:( id )sender{
if (action == @selector (copy:))//只要拷贝功能,屏蔽其他功能
{
return YES ;
}
else {
return NO ;
}
}
- ( void )copy:( id )sender
{
[ self resignFirstResponder ];
[ self userDownloadApkAOS ];
// 跳转到 AppStore 的搜索界面
[[ UIApplication sharedApplication ] openURL :[ NSURL URLWithString :[ NSString stringWithFormat : @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/search?id=" ]]];
}