如何在iOS中将UILabel的字体名称设置为HelveticaNeue Thin? [英] How to set font name of UILabel as HelveticaNeue Thin in iOS?
问题描述
我正在创建UILabel,对于标签我可以将字体名称设置为HelveticaNeue Regular,Light,UltraLight等,但是我无法将字体名称设置为HelveticaNeue Thin,它无法正常工作.我确实喜欢,
I am creating UILabel, for the label i can set the font name as HelveticaNeue Regular, Light, UltraLight etc, But i unable to set the font name as HelveticaNeue Thin, it is not working as expected. I did like,
label.font = [UIFont fontWithName:@"HelveticaNeue-Thin" size:16];
我在Google上搜索时也没有任何解决方案.如何解决这个问题?谢谢.
Also i have searched on Google didnt got any solution. How to fix this issue? Thanks.
推荐答案
此字体与iOS 7捆绑在一起,因此,如果您的目标是iOS 7及更高版本
This font is bundled with iOS 7, so if you're targeting iOS 7 and above your
label.font = [UIFont fontWithName:@"HelveticaNeue-Thin" size:16.0f];
将起作用.
However if you are targeting iOS 6.1 and below you'll need to embed the font
这篇关于如何在iOS中将UILabel的字体名称设置为HelveticaNeue Thin?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!