Ios 按fontName获取UIFontWeight的UIFontWeight
我尝试显示所有ios系统字体及其UIFontWeights。Ios 按fontName获取UIFontWeight的UIFontWeight,ios,swift,Ios,Swift,我尝试显示所有ios系统字体及其UIFontWeights。 如果我知道一个名字UIFont,我可以得到它的UIFontWeight?您可以使用此代码列出应用程序中的所有字体,包括系统字体和所有权重 for family: String in UIFont.familyNames { print("\(family)") for names: String in UIFont.fontNames(forFamilyName: family) { print("==
如果我知道一个名字UIFont,我可以得到它的UIFontWeight?您可以使用此代码列出应用程序中的所有字体,包括系统字体和所有权重
for family: String in UIFont.familyNames {
print("\(family)")
for names: String in UIFont.fontNames(forFamilyName: family) {
print("== \(names)")
}
}