界面生成器中的自定义字体 [英] Custom fonts in Interface Builder
问题描述
最令人惊奇的是,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屋!