Interface Builder 中的自定义字体 [英] Custom fonts in Interface Builder

查看:30
本文介绍了Interface Builder 中的自定义字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我们在 2014 年,有没有办法在 Interface Builder 中设置自定义字体?即不要以编程方式执行此操作,除了应用程序列表中的应用程序提供的字体".

So we're in 2014, is there any way to set custom fonts within Interface Builder yet? Ie don't do it programmatically, except for "Fonts provided by application" in the app's plist.

推荐答案

是的,Marrius 是对的.在 Xcode 6 中,您既不需要使用额外的软件,也不需要在代码文件中设置字体.只需将您的字体文件与其他文件一起添加到您的项目中.并且界面生成器将在自定义字体列表中显示添加的字体.

Yes, Marrius is right. In Xcode 6, you neither need to use extra software nor to set Font in Code files. Just add your font files in your project along with other files. And Interface builder will display the added fonts in the Custom Font List.

最令人惊奇的是,xcode 6 在 IB 中立即显示了应用的字体.这是 Apple 的重要补充.

And the most amazing thing is, xcode 6 shows the applied font instantly in IB. This is the great addition by Apple.

还要确保在您的项目的 info.plist 中添加应用程序提供的字体"这个键,并提供您的字体文件名以查看设备中的效果.

Also make sure to add this key "Fonts provided by application" in your project's info.plist and provide your font file names to see the effect in devices.

这篇关于Interface Builder 中的自定义字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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