Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在UIAppFontsinfo.plist 上添加了条目以启用自定义 ttf 字体,它工作正常。但是,当使用字体时,第一次调用 UIView 时也会出现延迟,有没有办法预加载字体或其他一些技术来避免这种情况?
UIAppFonts
谢谢
在您的应用程序委托或应用程序启动时调用的其他地方尝试创建一个隐藏的 UILabel 使用您的自定义字体并立即将其删除。这样,它将预加载字体,以便下次您使用带有该字体的 UILabel 时,它不会支付第一次罚款。