RCAttributedLabel Class Reference
| Inherits from | UILabel |
|---|---|
| Conforms to | RCAttributedDataSource UIGestureRecognizerDelegate |
| Declared in | RCAttributedLabel.h |
可以通过设置attributeDataSource或者attributeDictionary、highlightedAttributeDictionary来自定义不同文本的字体颜色
attributeDataSource
可以通过设置attributeDataSource或者attributeDictionary、highlightedAttributeDictionary来自定义不同文本的字体颜色
@property (nonatomic, strong) id<RCAttributedDataSource> attributeDataSourceDiscussion
可以通过设置attributeDataSource或者attributeDictionary、highlightedAttributeDictionary来自定义不同文本的字体颜色
Declared In
RCAttributedLabel.h
可以通过设置attributedStrings可以给一些字符添加点击事件等,例如在实现的会话列表里修改文本消息内容 -(void)willDisplayConversationTableCell:(RCMessageBaseCell )cell atIndexPath:(NSIndexPath )indexPath{
attributedStrings
可以通过设置attributedStrings可以给一些字符添加点击事件等,例如在实现的会话列表里修改文本消息内容 -(void)willDisplayConversationTableCell:(RCMessageBaseCell )cell atIndexPath:(NSIndexPath )indexPath{
@property (nonatomic, strong) NSMutableArray *attributedStringsDiscussion
可以通过设置attributedStrings可以给一些字符添加点击事件等,例如在实现的会话列表里修改文本消息内容 -(void)willDisplayConversationTableCell:(RCMessageBaseCell )cell atIndexPath:(NSIndexPath )indexPath{
if ([cell isKindOfClass:[RCTextMessageCell class]]) { RCTextMessageCell newCell = (RCTextMessageCell )cell; if (newCell.textLabel.text.length>3) { NSTextCheckingResult *textCheckingResult = [NSTextCheckingResult linkCheckingResultWithRange:(NSMakeRange(0, 3)) URL:[NSURL URLWithString:@“http://www.baidu.com”]]; [newCell.textLabel.attributedStrings addObject:textCheckingResult]; [newCell.textLabel setTextHighlighted:YES atPoint:CGPointMake(0, 3)]; } } }
Declared In
RCAttributedLabel.h
点击回调
delegate
点击回调
@property (nonatomic, weak) id<RCAttributedLabelDelegate> delegateDiscussion
点击回调
Declared In
RCAttributedLabel.h
attributeDictionary
attributeDictionary
attributeDictionary
@property (nonatomic, strong) NSDictionary *attributeDictionaryDiscussion
attributeDictionary
Declared In
RCAttributedLabel.h
highlightedAttributeDictionary
highlightedAttributeDictionary
highlightedAttributeDictionary
@property (nonatomic, strong) NSDictionary *highlightedAttributeDictionaryDiscussion
highlightedAttributeDictionary
Declared In
RCAttributedLabel.h
NSTextCheckingTypes 格式类型
textCheckingTypes
NSTextCheckingTypes 格式类型
@property (nonatomic, assign) NSTextCheckingTypes textCheckingTypesDiscussion
NSTextCheckingTypes 格式类型
Declared In
RCAttributedLabel.h
NSTextCheckingTypes current格式类型
currentTextCheckingType
NSTextCheckingTypes current格式类型
@property (nonatomic, readonly, assign) NSTextCheckingType currentTextCheckingTypeDiscussion
NSTextCheckingTypes current格式类型
Declared In
RCAttributedLabel.h
setTextdataDetectorEnabled
– setText:dataDetectorEnabled:
setTextdataDetectorEnabled
- (void)setText:(NSString *)text dataDetectorEnabled:(BOOL)dataDetectorEnabledParameters
text |
text |
|---|---|
dataDetectorEnabled |
dataDetectorEnabled |
Discussion
setTextdataDetectorEnabled
Declared In
RCAttributedLabel.h
setTextHighlighted
– setTextHighlighted:atPoint:
setTextHighlighted
- (void)setTextHighlighted:(BOOL)highlighted atPoint:(CGPoint)pointParameters
highlighted |
highlighted |
|---|---|
point |
point |
Discussion
setTextHighlighted
Declared In
RCAttributedLabel.h