On iOS devices within accessibility section of general settings you can change the text size, making it (much) larger or smaller. I hadn't come across this before, but to get your application to work with the user's settings you use 'Dynamic Type'. These are "UIFontTextStyle" elements which will automatically size around the user's text size setting. The settings available and their relative sizes are:
- Large Title - 44pt
- Title 1 - 38pt
- Title 2 - 34pt
- Title 3 - 31pt
- Headline - 28pt
- Body - 28pt
- Callout - 26pt
- Subhead - 25pt
- Footnote - 23pt
- Caption 1 - 22pt
- Caption 2 - 20pt
These values can be set in "Text Stye" for relevant elements, in xCode click the 'T' for the font and select desired style from the list.
Note: if you want your page to automatically resize existing elements if the user changes the text size whilst your app is open you can override 'awakeFromNib()' and set '.adjustsFontForContentSizeCategory' to 'true' for any element you want to update.
Comments
Post a Comment