私は iOS6 で NSAttributedString を使用していますが、これを機能させることができないようです:
[attributedString addAttribute:NSBackgroundColorAttributeName
value:[UIColor yellowColor]
range:range];
このメソッド呼び出しNSBackgroundColorAttributeName
は iOS6 でサポートされていますか?
編集:
解決しました。それは私の側の遺産の問題でした。以前の kct* (例: kctforegroundcolorattributename
) 文字列属性定数がまだ使用されていました。これらにより、新しい API 値が正しく実装されませんでした。