NSBackgroundColorAttributeName
區(qū)域內(nèi)字體的背景顏色
( 以下的 str 都是 NSMutableAttributedString )
[str addAttribute:NSBackgroundColorAttributeName
value:[ UIColor blackColor ]
range:NSMakeRange(1,6)];
NSBaselineOffsetAttributeName
區(qū)域內(nèi)字體的設(shè)置基線(xiàn)偏移值
[str addAttribute:NSBaselineOffsetAttributeName
value:@(2)
range:NSMakeRange(1,6)];
@( 2 ) 是調(diào)整位置 正值上偏苟鸯,負(fù)值下偏
NSFontAttributeName
區(qū)域內(nèi)字體的字體
[str addAttribute:NSFontAttributeName
value:[UIFont boldSystemFontOfSize:12]
range:NSMakeRange(1, 6)];
NSForegroundColorAttributeName
區(qū)域內(nèi)字體的顏色
[str addAttribute:NSForegroundColorAttributeName
value:[UIColor blackColor]
range:NSMakeRange(1, 6)];
( 待續(xù)更新... )