Font size on universal storyboard
Asked Answered
B

1

11

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?

Benoit answered 1/8, 2014 at 17:51 Comment(0)
F
37

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

Farmelo answered 1/8, 2014 at 18:8 Comment(5)
iPhone: wC hA, iPad: wR hAKnuckle
@Knuckle Your comment is what I was looking for :)Webfooted
@OrangeDog: Isn't this correct. iPhone portrait wC hR, iPhone landscape wR hC and in iPad both R? I knew it this way. Am I wrong?Rate
@Rate these were the classes of the devices I had at the time. Newer, bigger ones could well be different.Knuckle
This seems to be up-to-date: useyourloaf.com/blog/size-classesKnuckle

© 2022 - 2024 — McMap. All rights reserved.