通用故事板上的字体大小 [英] Font size on universal storyboard

查看:187
本文介绍了通用故事板上的字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从头开始在Xcode 6 beta 4上构建一个iOS应用程序。
我试图让它成为通用的,并使用autolayout来为iPhone和iPad提供相同的视图。

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?

例如,iPhone上的字体大小为10的按钮可能没问题,但是当我的按钮缩放到iPad时,我可能希望它更大。是应该以编程方式管理还是有智能方法来执行此操作?

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.

这篇关于通用故事板上的字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆