我在iOS6中使用NSAttributedString,我似乎无法使其工作:
[attributedString addAttribute:NSBackgroundColorAttributeName
value:[UIColor yellowColor]
range:range];
此方法是否在iOS6中支持并NSBackgroundColorAttributeName
?
修改
解决了它。这是我身边的遗留问题。之前的kct *(例如kctforegroundcolorattributename
)字符串属性常量仍在使用中。这些阻止了更新的API值正确实现。