RCAttributedLabel Class Reference
| Inherits from | UILabel | 
|---|---|
| Conforms to | RCAttributedDataSource UIGestureRecognizerDelegate  | 
| Declared in | RCAttributedLabel.h | 
  attributeDataSource
	可以通过设置attributeDataSource或者attributeDictionary、highlightedAttributeDictionary来自定义不同文本的字体颜色
@property (nonatomic, strong) id<RCAttributedDataSource> attributeDataSourceDiscussion
可以通过设置attributeDataSource或者attributeDictionary、highlightedAttributeDictionary来自定义不同文本的字体颜色
Declared In
RCAttributedLabel.h
  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
@property (nonatomic, strong) NSDictionary *attributeDictionaryDiscussion
attributeDictionary
Declared In
RCAttributedLabel.h
  highlightedAttributeDictionary
	highlightedAttributeDictionary
@property (nonatomic, strong) NSDictionary *highlightedAttributeDictionaryDiscussion
highlightedAttributeDictionary
Declared In
RCAttributedLabel.h
  textCheckingTypes
	NSTextCheckingTypes 格式类型
@property (nonatomic, assign) NSTextCheckingTypes textCheckingTypesDiscussion
NSTextCheckingTypes 格式类型
Declared In
RCAttributedLabel.h
  currentTextCheckingType
	NSTextCheckingTypes current格式类型
@property (nonatomic, readonly, assign) NSTextCheckingType currentTextCheckingTypeDiscussion
NSTextCheckingTypes current格式类型
Declared In
RCAttributedLabel.h
– setText:dataDetectorEnabled:
	setTextdataDetectorEnabled
- (void)setText:(NSString *)text dataDetectorEnabled:(BOOL)dataDetectorEnabledParameters
text | 
						text  | 
					
|---|---|
dataDetectorEnabled | 
						dataDetectorEnabled  | 
					
Discussion
setTextdataDetectorEnabled
Declared In
RCAttributedLabel.h
– setTextHighlighted:atPoint:
	setTextHighlighted
- (void)setTextHighlighted:(BOOL)highlighted atPoint:(CGPoint)pointParameters
highlighted | 
						highlighted  | 
					
|---|---|
point | 
						point  | 
					
Discussion
setTextHighlighted
Declared In
RCAttributedLabel.h