schwa/CoreTextToy — pull request #59 by dexman (2014-06-30 20:39:25+00:00)
Title: Fallback To UIKit attributes if Core Text attributes are not present

Starting in iOS 8, passing some UIKit text attributes stopped working. For example, in iOS 7, you could create an attributed string like:

NSDictionary *attrs = @{NSForegroundColorAttributedName: [UIColor redColor]
NSAttributedString *s = [[NSAttributedString alloc] initWithString:@"Foo" attributes:attrs];

In iOS 8, this font color would always be overridden by the default CCoreTextLabel textColor unless you passed in kCTForegroundColorAttributeName instead. It seems like there was some aliasing between the two styles of properties before that is no longer present.

I've added explicit fallbacks here to preserve the old behavior.