Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/115.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 按fontName获取UIFontWeight的UIFontWeight_Ios_Swift - Fatal编程技术网

Ios 按fontName获取UIFontWeight的UIFontWeight

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("==

我尝试显示所有ios系统字体及其UIFontWeights。
如果我知道一个名字UIFont,我可以得到它的UIFontWeight?

您可以使用此代码列出应用程序中的所有字体,包括系统字体和所有权重

for family: String in UIFont.familyNames {
    print("\(family)")
    for names: String in UIFont.fontNames(forFamilyName: family) {
        print("== \(names)")
    }
}