Skip to main content


Showing posts from October, 2017

iOS Dynamic Type

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 - 44ptTitle 1 - 38ptTitle 2 - 34ptTitle 3 - 31ptHeadline - 28ptBody - 28ptCallout - 26ptSubhead - 25ptFootnote - 23ptCaption 1 - 22ptCaption 2 - 20ptThese 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…