简体   繁体   中英

How to auto resize label font size in iPhone 6 plus?

The fonts I see on iPhone 6 Plus seems too small. Fonts throughout the app differ in sizes. So the font size is not same in all screen. And I know that by putting condition to identify device and setting font size is not a good practice. I am not using autolayout. Everything I create is using programming. So what is the best way to auto size fonts?

One alternative is UIFont.preferredFontForTextStyle(_:) . Here is the documentation for that method. It will return you a system font based on the user's text size preference.

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