3

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?

iGatiTech
  • 2,306
  • 1
  • 21
  • 45
sachin_kvk
  • 77
  • 1
  • 9

2 Answers2

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

  1. Click on "+" button near font setting in image you can see that
  2. select size of scree and assign font type and size.

Setup Font

enter image description here

After setting up

enter image description here

jignesh Vadadoriya
  • 3,244
  • 3
  • 18
  • 29