Caution!粗体的字体名

程序在 iOS7+ 上运行正常,但在 iOS6 上会直接崩溃,且没有任何崩溃信息。
经单步调试,发现问题出现在这一句上:

1
NSMutableAttributedString *attributedType = [[NSMutableAttributedString alloc] initWithString:@"hello" attributes:@{NSFontAttributeName: [UIFont fontWithName:@"Verdana-bold" size:14.0],NSForegroundColorAttributeName:[UIColor redColor]}];

所需实现的是将一个 NSAttributedString 显示在一个 UILabel 上,我的印象中 iOS6 是支持在 UILabel 上显示 AttributedString 的,实际证明也是这样,所以排除了 iOS6 不支持。

经过猜测和尝试,发现是这个 -bold 的缘故,改为 -Bold 就正常了,而且在 iOS7+ 上也是正常的。

晕…好吧。