界面生成器中的自定义字体 [英] Custom fonts in Interface Builder

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

问题描述

所以我们在2014年,有没有什么方法可以在Interface Builder中设置自定义字体呢?也就是说,除了应用程序的plist中的应用程序提供的字体以外,不会以程序的方式进行操作。 是的,Marrius是对。在Xcode 6中,您不需要使用额外的软件,也不需要在代码文件中设置字体。只需将您的字体文件与其他文件一起添加到您的项目中。界面生成器将在自定义字体列表中显示添加的字体。



最令人惊奇的是,xcode 6在IB中立即显示应用字体。这是苹果的伟大的增加。



另外请确保在项目的info.plist中添加这个键应用程序提供的字体,并提供您的字体文件名在设备中的效果。

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.

解决方案

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.

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

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.

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

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