kishikawakatsumi / SECoreTextView

SECoreTextView is multi style text view.
MIT License
943 stars 143 forks source link

UITextAttributeTextColor setting in attributedText is not respected on iOS6 #16

Closed WeiZheng closed 10 years ago

WeiZheng commented 10 years ago

Hi,

I may find a bug which only appears on iOS6 (may on iOS5 as well).

On iOS6, setting attributedText with NSAttributedString that has UITextAttributeTextColor attribute has no effect. The text is still displayed in black.

In order to display text in custom color and font on iOS6, font and textColor ivar must be both set.

Regards,

kishikawakatsumi commented 10 years ago

UITextAttributeTextColor is not compatible with CoreText.framework. Use NSForegroundColorAttributeName instead.

If your app supports iOS 5, you can use kCTForegroundColorAttributeName. When use kCTForegroundColorAttributeName, the value object is instance of CGColorRef.

WeiZheng commented 10 years ago

Thank you for the explanation. :) I close the issue.