<分区>
我想禁用复制/粘贴菜单,我在 UITextView
中使用 HTML 标记,其中有多个超链接,并且只想禁用菜单。
我的texview图片
标签 ios iphone ios7 ios5 uitextview
<分区>
我想禁用复制/粘贴菜单,我在 UITextView
中使用 HTML 标记,其中有多个超链接,并且只想禁用菜单。
我的texview图片
最佳答案
只是尝试创建一个 UITextView 的子类来覆盖 canPerformAction:withSender:
方法
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
if (action == @selector(paste:))
return NO;
return [super canPerformAction:action withSender:sender];
}
关于ios - 如何禁用 UITextview 选择文本,复制/粘贴 UIMenuController 但仍然有超链接工作[不重复],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46167959/