Iphone 允许用户选择并复制TTStyledTextLabel中的文本

Iphone 允许用户选择并复制TTStyledTextLabel中的文本,iphone,ios,three20,Iphone,Ios,Three20,我不确定这是一个问题还是ios/iphone(我在这两个领域都是新手) 我目前正在表视图中使用TTStyledTextLabel来呈现样式化内容。现在我想允许用户选择文本并复制它。检查源代码中的TTSTyledTextLabel我发现: #pragma mark - #pragma mark UIResponderStandardEditActions - (void)copy:(id)sender { NSString* text = _text.rootNode.outerText;

我不确定这是一个问题还是ios/iphone(我在这两个领域都是新手)

我目前正在表视图中使用
TTStyledTextLabel
来呈现样式化内容。现在我想允许用户选择文本并复制它。检查源代码中的
TTSTyledTextLabel
我发现:

#pragma mark -
#pragma mark UIResponderStandardEditActions

- (void)copy:(id)sender {
  NSString* text = _text.rootNode.outerText;
  UIPasteboard* pasteboard = [UIPasteboard generalPasteboard];
  [pasteboard setValue:text forPasteboardType:@"public.utf8-plain-text"];
}
这表明标签已准备好帮助实际复制。但我不知道如何让它允许文本选择


任何人有什么想法吗?

几年后重温。。。如果不重写TTStyledText类,这是不可能的。

我也在尝试做与您完全相同的事情,您知道怎么做了吗?谢谢。不用了,不过这几乎是不可能的。我现在在UI中添加了报价按钮。