I have a title in my screen whose font size is 16 but in iPhone 5s/4s it looks slightly bigger, so I want to adjust font size based on different iPhone screen size. Is it possible via storyboard?
Asked
Active
Viewed 2,106 times
3
-
Via, storyboard, only iPhone and iPad, v can do it.. for this, Coding – McDonal_11 Feb 21 '18 at 10:14
-
@McDonal_11 can you provide me with some sample codes or links..that would be great. – sachin_kvk Feb 21 '18 at 10:17
-
https://stackoverflow.com/questions/48630776/uitextview-font-to-always-be-fixed-size/48646121#48646121 get answer from here – McDonal_11 Feb 21 '18 at 10:19
-
https://stackoverflow.com/questions/26236145/different-font-size-for-uilabel-using-adaptive-layout – Arasuvel Feb 21 '18 at 10:26
-
You can vary the font size using `Traits` in `Storyboard`. – Rocky Feb 21 '18 at 10:54
-
@sachin_kvk checkout my question – jignesh Vadadoriya Feb 21 '18 at 11:24
-
Check below link:- https://stackoverflow.com/a/53496831/5857254 Hope it helps :) – Pratyush Pratik Nov 27 '18 at 13:32
2 Answers
0
yes, you can ask iOS to adapt automatically, BUT using Apple directions. By the way apple states: (since ios7)
https://developer.apple.com/ios/human-interface-guidelines/visual-design/typography/
1) "Use built-in text styles whenever possible." (algorithm is form apple..)
2) "Dynamic Type provides additional flexibility by letting readers choose their preferred text size."
So Apple has already took in account all variations on devices and fonts and user preferences. (maybe is NOT what you want.. but is the official way to scale / adapt fonts)

ingconti
- 10,876
- 3
- 61
- 48
0
By using xCode you can give dynamic font like this way check bellow image
- Click on "+" button near font setting in image you can see that
- select size of scree and assign font type and size.
Setup Font
After setting up

jignesh Vadadoriya
- 3,244
- 3
- 18
- 29
-
i think this is for ipad and iphone.. i need solution for iphones only. – sachin_kvk Feb 21 '18 at 11:26