本文介绍了UIFont fontWithName字体名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设您想要UIFont的特定字体。
你怎么知道它叫什么?

Say you want a specific font for UIFont.How do you know what it's called?

例如。如果你想使用这段代码:

E.g. if you wanted to use this code:

[someUILabelObject setFont:[UIFont fontWithName:@"American Typewriter" size:18]];

从哪里复制确切的短语American Typewriter。 Xcode中是否有头文件?

From where do you copy the exact phrase "American Typewriter". Is there a header file in Xcode?

UPDATE

还找到方便。

推荐答案

你可能会对调试器中的Quick Win感兴趣:

Might be interesting for you as Quick Win within the Debugger:

(lldb) po [UIFont fontNamesForFamilyName:@"Helvetica Neue"]

(id) $1 = 0x079d8670 <__NSCFArray 0x79d8670>(
HelveticaNeue-Bold,
HelveticaNeue-CondensedBlack,
HelveticaNeue-Medium,
HelveticaNeue,
HelveticaNeue-Light,
HelveticaNeue-CondensedBold,
HelveticaNeue-LightItalic,
HelveticaNeue-UltraLightItalic,
HelveticaNeue-UltraLight,
HelveticaNeue-BoldItalic,
HelveticaNeue-Italic
)

这篇关于UIFont fontWithName字体名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-28 14:23