自定义字体可以在模拟器上使用,但无法在某些情节提要中渲染 [英] Custom fonts are working on simulator but NOT rendering in some storyboards

查看:58
本文介绍了自定义字体可以在模拟器上使用,但无法在某些情节提要中渲染的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

免责声明:自定义字体显示在情节提要/界面构建器和 不是在模拟器中出现的是一个受欢迎的问题, ...之前曾被问过...,不要被这个不同的问题所迷惑.

Disclaimer : Custom fonts show up in storyboard/ interface builder and not in simulator is a popular question that is asked before... and not to be confused by this different question.

我的情况是相反的,该字体在模拟器中有效,但不能在所有情节提要中显示...我想知道为什么它在某些情节提要中而不是在其他情节提要中起作用.

my case is the other way around, the font is working in simulator but not showing in all storyboards... I wonder why it works in some storyboards and not others..

我在网上没有找到答案,答案将立即被附上,这花了我一些时间才能解决...

I found no answer online, answer will be attached now, it took me some time to figure this out...

推荐答案

解决方案简单,转到目标副本捆绑资源,并确保问题的故事板具有靠近它的路径和它旁边的图标(这意味着它已添加到右边),如果没有(例如,我离开了LaunchScreen.storyboard),则只需转到该文件并使它相对于项目而不是相对于组即可,仅此而已.

solution is simple, go to your target copy bundle resources and make sure the storyboard of question has a path near it and icon next to it (which means it's added right), if not (I left LaunchScreen.storyboard as example) then simply go the the file and make it relative to project rather than to group, and that's it...

该示例显示了界面构建器直接呈现我的字体..并且该字体将可以从自定义字体菜单中选择.

example showing interface builder rendering my font directly.. and the font will be pickable from the custom fonts menu.

据我所知,文件的顺序并不重要,但请确保显示图标和路径(表示添加成功)

as far as I know, the order of the files is not significant, but make sure the icon and path are showing up (which indicates a successful adding)

这篇关于自定义字体可以在模拟器上使用,但无法在某些情节提要中渲染的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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