Custom fonts are working on simulator but NOT rendering in some storyboards

为君一笑 提交于 2019-12-14 03:08:42

问题


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...


回答1:


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)



来源:https://stackoverflow.com/questions/55873120/custom-fonts-are-working-on-simulator-but-not-rendering-in-some-storyboards

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!