Exploring text styles
The first step in order to understand and take advantage of Dynamic Type is to learn what a text style is.
You are probably used to defining fonts by setting the font size and font family. This definition is really strict, in that you are setting fixed sizes via specific numeric values.
A text style is more likely to be intended as a semantic description that doesn't give any information about font size but describes the way the font is used within the text context. Now, you can choose between six different styles with quite self-explanatory names:
UIFontTextStyleTitle(1,2,3)
UIFontTextStyleHeadline
UIFontTextStyleSubheadline
UIFontTextStyleBody
UIFontTextStyleCallout
UIFontTextStyleFootnote
UIFontTextStyleCaption1
UIFontTextStyleCaption2
Each text style, depending on the user's preferences, is associated with specific traits and a font size that is not under our control.
The simplest way to create UI elements that use text styles is through Interface Builder. We...