简体   繁体   English

无法将自定义字体添加到Xcode

[英]Cannot add custom font to Xcode

OK, so I've done a lot of reading, followed several tutorials, and I still cannot add a custom font to my iOS app. 好的,所以我已经读了很多书,跟随了一些教程,但仍然无法在iOS应用中添加自定义字体。

I've (1) added and copied the fonts to xcode. 我(1)添加了字体并将其复制到xcode。 在此处输入图片说明

I've (2) added them to the correct target. 我(2)将它们添加到了正确的目标。 在此处输入图片说明

I've (3) made sure they are included as resources in the bundle. 我(3)确保将它们作为资源包含在捆绑包中。 在此处输入图片说明

I've (4) included them in my info.plist. 我(4)将它们包含在我的info.plist中。 在此处输入图片说明

I've (5) tried to find them in my list of fonts by inserting this code. 我(5)试图通过插入此代码在字体列表中找到它们。 在此处输入图片说明

Yet the fonts STILL do not appear. 但是字体仍然没有出现。 I recognize that the font name is not the same as the file name, but I compared the list of font family names and font names from before and after, and they are the exact same, proving no fonts were added. 我认识到字体名称与文件名不同,但是我比较了字体家族名称和字体名称的列表,前后它们是完全相同的,证明没有添加字体。 I've followed SO and these tutorials to a T but nothing is working. 我遵循了SO和这些教程,但没有任何帮助。

您无意中将它们添加到了错误的(测试)Info.plist。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM