/*预定义字符属性的文本。如果钥匙不在字典,然后使用默认值,如下所述。 */
以下属性是IOS6的
NSVerticalGlyphFormAttributeName NS_AVAILABLE_IOS(6_0); 一个NSNumber包含一个整数的值。0表示水平文本。1表示垂直文本。如果没有指定,它可以按照上级的垂直方向设置。目前在iOS,它总是水平。任何其他的行为是未定义的值。
NSFontAttributeName NS_AVAILABLE_IOS(6_0); uifont,默认Helvetica(新)12
NSParagraphStyleAttributeName NS_AVAILABLE_IOS(6_0); NSParagraphStyle, default defaultParagraphStyle 设置段落的
NSForegroundColorAttributeName NS_AVAILABLE_IOS(6_0); UIColor, default blackColor 设置前景颜色
NSBackgroundColorAttributeName NS_AVAILABLE_IOS(6_0); UIColor, default nil: no background 设置背景颜色
NSLigatureAttributeName NS_AVAILABLE_IOS(6_0); 包含整数的NSNumber, default 1: default 连写字符, 0: 非连写字符
NSKernAttributeName NS_AVAILABLE_IOS(6_0); NSNumber包含浮点值,在点量修改默认的字距调整。0指间距是不可用的。
NSStrikethroughStyleAttributeName NS_AVAILABLE_IOS(6_0); 包含整数的NSNumber, default 0: 没有删除线
NSUnderlineStyleAttributeName NS_AVAILABLE_IOS(6_0); 包含整数的NSNumber, default 0: 没有下划线
NSStrokeColorAttributeName NS_AVAILABLE_IOS(6_0); UIColor, 默认是和前景色一致的 设置笔画的颜色
NSStrokeWidthAttributeName NS_AVAILABLE_IOS(6_0); NSNumber包含浮点值, 在字体大小默认是百分之0: no stroke; 对单独的笔画是有利的,对充满的笔画模式是不利的 (在概述了文本的典型值是3)
NSShadowAttributeName NS_AVAILABLE_IOS(6_0); NSShadow, 默认是没有阴影的
以下的属性是IOS7的
NSTextEffectAttributeName NS_AVAILABLE_IOS(7_0); NSString, default nil: no text effect(影响)
NSAttachmentAttributeName NS_AVAILABLE_IOS(7_0); NSTextAttachment, default nil 附件属性
NSLinkAttributeName NS_AVAILABLE_IOS(7_0); NSURL (preferred) or NSString
NSBaselineOffsetAttributeName NS_AVAILABLE_IOS(7_0); NSNumber containing floating point value, in points; offset from baseline, default 0
NSUnderlineColorAttributeName NS_AVAILABLE_IOS(7_0); UIColor, default nil: same as foreground color
NSStrikethroughColorAttributeName NS_AVAILABLE_IOS(7_0); UIColor, default nil: same as foreground color
NSObliquenessAttributeName NS_AVAILABLE_IOS(7_0); NSNumber containing floating point value; skew to be applied to glyphs, default 0: no skew
NSExpansionAttributeName NS_AVAILABLE_IOS(7_0); NSNumber containing floating point value; log of expansion factor to be applied to glyphs, default 0: no expansion
NSWritingDirectionAttributeName NS_AVAILABLE_IOS(7_0); NSArray of NSNumbers representing the nested levels of writing direction overrides as defined by Unicode LRE, RLE, LRO, and RLO characters. The control characters can be obtained by masking NSWritingDirection and NSTextWritingDirection values. LRE: NSWritingDirectionLeftToRight|NSTextWritingDirectionEmbedding, RLE: NSWritingDirectionRightToLeft|NSTextWritingDirectionEmbedding, LRO: NSWritingDirectionLeftToRight|NSTextWritingDirectionOverride, RLO: NSWritingDirectionRightToLeft|NSTextWritingDirectionOverride,