Prior to iOS 6, providing mixed styles for your text was available using UIWebView and HTML markup or using the lower level framework Core Text. With the launch of iOS 6, Apple introduced attributed strings, allowing developers to adjust color and font attributes on defined subsections of any string. The first 10 characters could be set to a color of yellow and the remaining characters a bold font.
In iOS 6, text-based UIKit controls were based on both Core Graphics and WebKit. Here is a diagram to illustrate the hierarchy:
You will notice that UITextView actually uses WebKit itself for the sake of drawing attributed text using HTML. Although attributed strings provided many solutions for working with text, they were limited in flexibility for advanced layouts. This multi-line rendered text required the use of Core Text. This framework is very difficult to work with and understand.
With iOS 7, Apple has introduced TextKit to streamline working with text. Apple now inherits...