OGeek|极客世界-中国程序员成长平台

标题: ios - 我的应用程序在添加 Aller 字体系列的字体(如 Bold、Regular 和 Italics)时崩溃 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 10:00
标题: ios - 我的应用程序在添加 Aller 字体系列的字体(如 Bold、Regular 和 Italics)时崩溃

我已将它们正确添加到我的 plist 中并创建了一个自定义 UIFont 类,我在其中使用此 Aller 字体覆盖系统字体。对于相同的代码和相同的过程,如果我正在集成 Lato 字体它工作正常。问题仅与Aller 字体。

il passed to [UILabel setFont:] and [UILabel defaultFont] is also nil. Don't know what to do, so leaving font as (null) 0.000000
2014-12-18 15:33:50.715 2497:72343] Unable to load string table file: CFBundle 0x7fcfcae121a0 </Users/arun/Library/Developer/CoreSimulator/Devices/8A7E96AE-E960-4DAF-BD6F-79E533711C63/data/Containers/Bundle/Application/50D90A3E-10C5-4E02-A0D3-A1AAA86508D8.app> (executable, loaded) / Main: The operation couldn’t be completed. (Cocoa error 3840.)
2014-12-18 15:33:50.735 [2497:72343] nil passed to [UIButton setFont:] and [UIButtonLabel defaultFont] is also nil. Don't know what to do, so leaving font as (null) 0.000000
2014-12-18 15:33:50.737 [2497:72343] nil passed to [UIButton setFont:] and [UIButtonLabel defaultFont] is also nil. Don't know what to do, so leaving font as (null) 0.000000
2014-12-18 15:33:50.737[2497:72343] nil passed to [UILabel setFont:] and [UILabel defaultFont] is also nil. Don't know what to do, so leaving font as (null) 0.000000
2014-12-18 15:33:50.742[2497:72343] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: NSParagraphStyle)'



Best Answer-推荐答案


这真是令人不安的情况。即使我花了很多时间研究解决方案。终于得到了一个专门针对 Aller 等字体的字体,你可以试试这个。它对我有帮助。 尝试通过在 Font Book 中打开字体文件并使用其中显示的字体名称来检查字体的正确名称。

关于ios - 我的应用程序在添加 Aller 字体系列的字体(如 Bold、Regular 和 Italics)时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27543957/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4