Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Different font size on Different devices in same size class

Hi I am new with the size class. As far I know Apple has given one size class (Compact + Regular) for Portrait iPhone 4s, 5, 6 and 6+. So How can I give different fonts size in these three different devices By storyboard or Any other way to do that. Thanks Happy coding

like image 412
chakshu Avatar asked Oct 30 '22 22:10

chakshu


1 Answers

Autolayout and SizeClasses wouldn't target specific devices, so you will have to set the font sizes programatically. You can use check the size of your device using UIScreen.mainScreen().bounds.size.height and set the size of your font accordingly. This solution will clarify you more.

like image 164
Munahil Avatar answered Nov 13 '22 17:11

Munahil



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!