Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.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 如何从UIFont实例检索当前系统设计?_Ios_Uifont_Uifontdescriptor - Fatal编程技术网

Ios 如何从UIFont实例检索当前系统设计?

Ios 如何从UIFont实例检索当前系统设计?,ios,uifont,uifontdescriptor,Ios,Uifont,Uifontdescriptor,给定一个UIFont实例,如何确定它使用的是什么系统设计?这是值UIFontDescriptor.SystemDesign,可以是以下值之一:默认值、单间隔、四舍五入或衬线 我知道如何通过UIFontDescriptor.withDesign()设置该值,但不清楚如何在当前字体上读取该值。是否检查了UIFont的fontDescriptor?我还想检索字体权重akaUIFont.weight。如果解决方案指向与设计相同的方向,我将把它合并到我的问题中。(已经有一个获取权重的问题,但没有提供令人满

给定一个
UIFont
实例,如何确定它使用的是什么系统设计?这是值
UIFontDescriptor.SystemDesign
,可以是以下值之一:
默认值
单间隔
四舍五入
衬线


我知道如何通过
UIFontDescriptor.withDesign()
设置该值,但不清楚如何在当前字体上读取该值。

是否检查了UIFont的fontDescriptor?我还想检索字体权重aka
UIFont.weight
。如果解决方案指向与设计相同的方向,我将把它合并到我的问题中。(已经有一个获取权重的问题,但没有提供令人满意的解决方案。)
fontDescriptor
返回一个具有SystemDesign的
UIFontDescriptor
对象?从我所看到的,字体描述符属性没有system design。可能它被隐藏在
UIFontDescriptor.fontAttributes
中,但我并没有看到任何明显的东西。你们检查过UIFont的fontDescriptor吗?我还想检索字体权重aka
UIFont.weight
。如果解决方案指向与设计相同的方向,我将把它合并到我的问题中。(已经有一个获取权重的问题,但没有提供令人满意的解决方案。)
fontDescriptor
返回一个具有SystemDesign的
UIFontDescriptor
对象?从我所看到的,字体描述符属性没有system design。可能它隐藏在
UIFontDescriptor.fonttributes
中,但我没有看到任何明显的东西。