Search code examples
iosautolayoutsize-classes

How to declare different font sizes for same size class in adaptive auto layout in xcode?


Adaptive Auto layout supports size class specific font size adjustments but what if I want to provide different font size for iphone 4/4s, 5/5s, 6/6s and 7/7s? all are compact-regular size class.


Solution

  • This doesn't work with adaptive layout. Apple thinks, you should use the same font size for these different devices if they have the same size class.

    You might have to get the screen size and change the font size according to that.