简体   繁体   中英

How to adjust font size for various iPhone screen sizes in iOS?

I have an app designed for 5s with a font size of 13px. But when the same is run in iPhone6 Plus font is looking very tiny. Although position and size of the elements is adjusting accordingly to the size thanks to percentage based element position and layout.

Any idea on how to change the font according to screen size ?

Here is an example of how you can customize font for different devices (section Adaptive Fonts almost in the end of tutorial)

Short instruction how to do this:

  1. Select label in Interface Builder 在此处输入图片说明

  2. Press + button near Font and select device size, for which you want to have another font 在此处输入图片说明

  3. Set new font for that devices 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM