Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

changing the font size according to each iPhone size

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

like image 710
aznelite89 Avatar asked Sep 16 '16 03:09

aznelite89


People also ask

Why does my font size keep changing on iPhone?

If the font changes, it's because the app you have open changed it, not you. But that doesn't mean you can't edit the text at all. Every iPhone lets you change the font size, making it either bigger or smaller. This is great for users with impaired vision, or with magnified screens.

How do I change the size of everything on my iPhone?

Go to Settings > Display & Brightness > Display Zoom. Select Larger Text to make all the text on iPhone larger. Tap Done, then tap Use Zoomed.


2 Answers

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

like image 191
Ganesh Amrule Avatar answered Oct 22 '22 16:10

Ganesh Amrule


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.

like image 4
Hamiz Ahmed Avatar answered Oct 22 '22 16:10

Hamiz Ahmed