// // AttributedLabel.h // AttributedStringTest // // Created by sun huayu on 13-2-19. // Copyright (c) 2013年 sun huayu. All rights reserved. // #import #import #import @interface AttributedLabel : UILabel{ NSMutableAttributedString *_attString; } @property (nonatomic,retain)NSMutableAttributedString *attString; - (id)initWithFrame:(CGRect)frame strikethroughPosition:(CGRect) _strikeRect; // 设置某段字的颜色 - (void)setColor:(UIColor *)color fromIndex:(NSInteger)location length:(NSInteger)length; // 设置某段字的字体 - (void)setFont:(UIFont *)font fromIndex:(NSInteger)location length:(NSInteger)length; // 设置某段字的风格 - (void)setStyle:(CTUnderlineStyle)style fromIndex:(NSInteger)location length:(NSInteger)length; @end