0

I want to style a label. Nothing crazy, just some coloring, changing of font-sizes for specific words, etc. I can do this with NSAttributedString, but would it be possible/better to do in TextKit, newly introduced with iOS 7?

I've looked around, but TextKit doesn't yet have a ton of tutorials, and none seem to address this.

Doug Smith
  • 29,668
  • 57
  • 204
  • 388

1 Answers1

3

It should still be done with NSAttributedStrings as the parameters you've listed exactly describe the attributes of strings. NSTextStorage is a subclass of NSMutableAttributedString but it's not intended for what you want to do (I think this class might have misled you).

Using Text Kit to Draw and Manage Text contains a nice overview of Text Kit objects, I highly recommend reading it.

Arek Holko
  • 8,966
  • 4
  • 28
  • 46