Font size on universal storyboard

2019-01-14 18:36发布

问题:

I'm building an iOS app from scratch on Xcode 6 beta 4. I'm trying to make it universal and to use autolayout to have the same views for iPhone and iPad.

What is the best way to manage font sizes?

For instance, a button with font size 10 might be OK on an iPhone, but I might want it to be bigger when my button scales up for the iPad. Should it be managed programmatically or is there a smart way to do this?

回答1:

When you're using universal storyboards, each text-displaying control in a storyboard will now have a small + icon to the left of the font setting in the Attributes Inspector. If you click it, it will allow you to set different values for different size classes.

From @OrangeDog comment

iPhone: wC hA | iPad: wR hA