ILEditLabel 是支持ios的复制&编辑
您可以通过打开项目来读取源中的文件来轻松使用。
创建一个就像普通
self.editLabel = [[ILEditLabel alloc] initWithFrame:CGRectMake(20, 100, [UIScreen mainScreen].bounds.size.width - 40 , 30)];
启用复制功能。
[self.editLabel setCopyingEnabled:YES];
在触发复制时自定义背景色。
self.editLabel.backgroundColor = [UIColor colorWithRed:0.9 green:0.9 blue:0.93 alpha:1];
self.editLabel.copyingBackgroundColor = [UIColor grayColor];
启用复制功能,以便您可以单击
[self.editLabel setEditEnabled:!self.editLabel.editEnabled];