Working with Dynamic Type
With the introduction of iOS 7, the way we work with text has greatly improved. The whole iOS structure has been refined to make it easier for us to complete complex tasks with the help of an easier-to-use framework: Text Kit. The main controls based on text, such as UILabel
, UITextField
, and UITextView
are defined at the top of Text Kit.
Before iOS 7, the only way to handle text layout was working with Web views or text core, a really complex framework that is still at the base of the text drawing. Fortunately, thanks to Text Kit, you are much less likely to work directly with it now.
We won't explore Text Kit in detail here, but we will definitely talk about one of its features that is closely related to adaptive layouts: Dynamic Types.
Configurable text size
Before diving into Dynamic Types, it is important to talk about text sizes, a new option that iOS users can access via their device settings.
This feature has received a lot of support from Apple since its introduction...