| 1234567891011121314151617181920212223242526272829303132 |
- //
- // AttributedLabel.h
- // AttributedStringTest
- //
- // Created by sun huayu on 13-2-19.
- // Copyright (c) 2013年 sun huayu. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- #import <CoreText/CoreText.h>
- #import <QuartzCore/QuartzCore.h>
- @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
|