IOS中的自定义字体未在设备上反映

IOS中的自定义字体未在设备上反映,第1张

概述我跟着这个 tutorial并且我的故事板上显示了自定义字体但是当我执行我的应用程序(在模拟器或设备上)时,字体没有被反映出来.有谁可以帮忙. 这就是我做的: 1- downloaded a .ttf file and copied it to my project2- added "Fonts Provided By Application" in info.plist and added a 我跟着这个 tutorial并且我的故事板上显示了@R_301_6942@字体但是当我执行我的应用程序(在模拟器或设备上)时,字体没有被反映出来.有谁可以帮忙.
这就是我做的:

1- downloaded a .ttf file and copIEd it to my project2- added "Fonts ProvIDed By Application" in info.pList and added a row having the name of my custom Font.3- opened storyboard and selected the UILabel i want to have a custom Font for,and selected the Font as custom then selected my Font. the Font was shown on the storyboard correctly.

我错过了什么吗?

解决方法 谢谢@Andrey Chernuka和@jcaron.我通过将目标成员资格设置为我的项目然后退出项目(由于某种原因清理无效)并重新打开项目并设置了所有内容来解决问题.当我打印print(UIFont.familynames())时出现字体名称 总结

以上是内存溢出为你收集整理的IOS中的自定义字体未在设备上反映全部内容,希望文章能够帮你解决IOS中的自定义字体未在设备上反映所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1015542.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-22
下一篇2022-05-22

发表评论

登录后才能评论

评论列表(0条)

    保存