سؤال

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?

هل كانت مفيدة؟

المحلول

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.enter image description here

From @OrangeDog comment

iPhone: wC hA | iPad: wR hA

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top