将NSFontAttributeName设置为粗体字体

时间:2015-10-18 10:58:49

标签: ios swift nsfont

我尝试将以下代码应用于当前自定义字体的粗体,如何将其包含在字典中?

let normalWhite = [NSFontAttributeName : UIFont(name: "somefont", size: 16.0)!,NSForegroundColorAttributeName : UIColor.whiteColor()]

1 个答案:

答案 0 :(得分:1)

我认为您应该在Xcode中包含自定义粗体字体文件,并将其名称写为Helvetica-Bold

相关问题