changing the font size according to each iPhone size

13,023

Solution 1

Please use size classes to support different font size for different screens. Here is good tutorial about using size classes. adaptive-layout-tutorial

Solution 2

I ran in to a similar issue. I suggest to use this library: https://github.com/hamiz-ahmed/SizeOptimizedLabel

Specify the initial screen and font size. The font gets optimized automatically according to different screen sizes.

Solution 3

I faced this issue few months ago. There is no way to do it on storyboard for now.

You can do it by code by detect screen size or device type and set font size for each device. You can use this lib to do that

https://github.com/sebyddd/SDVersion

Share:
13,023
aznelite89
Author by

aznelite89

i love technology and enjoyed using apple products and developing application through Xcode. Personally, i like to reading and traveling

Updated on July 20, 2022

Comments

  • aznelite89
    aznelite89 almost 2 years

    is there any way to changing/auto resizing the font size according to the different iPhone screen as when i change the font size, the font size applied to other phone size as well which is too big.

    My Current Phone size is iPhone 6s plus (5.5 inch) enter image description here

    enter image description here