标签(空格分隔): ios 剪切板
1.文本UILable设置可以交互 2.添加长按手势
[jobInfoText addGestureRecognizer:longPress];```
3.响应`长按手势`
```- (void)copyText:(UILongPressGestureRecognizer *)gesture
{
if (gesture.state ==UIGestureRecognizerStateBegan)
{
UIPasteboard *pasteboard = [UIPasteboardgeneralPasteboard];
[pasteboard setString:self.jobInfoText.text];
}
}```
复制代码