changing the font size according to each iPhone size
Asked Answered
P

3

10

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

Pursy answered 16/9, 2016 at 3:49 Comment(1)
Check below link:- https://mcmap.net/q/828816/-how-to-ios-item-and-font-sizes-scaling-as-screen-size Hope it helps :)Hygeia
T
5

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

Tachometer answered 16/9, 2016 at 5:18 Comment(1)
this help a lot , i think this is worked for Xcode 7 but Xcode adaptive seems like to trait instead of size classes , i solved it , thanks Ganesh!Pursy
U
4

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.

Unifoliate answered 16/9, 2016 at 7:15 Comment(0)
T
2

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

Try answered 16/9, 2016 at 6:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.