1、常见的属性及说明
NSFontAttributeName //字体
NSParagraphStyleAttributeName //段落格式
NSForegroundColorAttributeName //字体颜色
NSBackgroundColorAttributeName //背景颜色
NSStrikethroughStyleAttributeName //删除线格式
NSUnderlineStyleAttributeName //下划线格式
NSStrokeColorAttributeName //删除线颜色
NSStrokeWidthAttributeName //删除线宽度
NSShadowAttributeName //阴影
2、常见方法:
//为某一范围内文字设置多个属性
- (void)setAttributes:(NSDictionary *)attrs range:(NSRange)range;
//为某一范围内文字添加某个属性
- (void)addAttribute:(NSString *)name value:(id)value range:(NSRange)range;
//为某一范围内文字添加多个属性
- (void)addAttributes:(NSDictionary *)attrs range:(NSRange<