【问题标题】:Cannot set uilabel font in ios 7( not using custom font)无法在 ios 7 中设置 uilabel 字体(不使用自定义字体)
【发布时间】:2015-04-01 02:39:33
【问题描述】:

背景: 字体使用:AppleSDGothicNeo-Light

ios支持:ios7+

问题: 我通过以下方式设置 uilabel 的字体:

self.lblName.font = [UIFont fontWithName:@"AppleSDGothicNeo-Light" size:12.f];

我的预期:

我在iOS7中得到的(iOS8还可以):

当我想打印调试描述时,它得到了: font-family: "AppleSDGothicNeo-Light";字体粗细:正常;字体样式:正常;字体大小:12.00pt

发生了什么?

【问题讨论】:

  • 我终于把字体改成了自定义字体.....

标签: ios ios7 fonts


【解决方案1】:

希望对你有帮助..

UIFont *myFont = [UIFont fontWithName:@"AppleSDGothicNeo-Light size:12];
[yourLable setFont:myFont];

【讨论】:

  • 谢谢,但是不能。
猜你喜欢
  • 2014-09-11
  • 1970-01-01
  • 1970-01-01
  • 2012-06-03
  • 1970-01-01
  • 2013-06-20
  • 2014-03-11
  • 2011-11-18
  • 1970-01-01
相关资源
最近更新 更多