0
我试图将下面的代码应用于当前自定义字体的粗体,我如何将它包含在字典中?设置NSFontAttributeName为加粗字体
let normalWhite = [NSFontAttributeName : UIFont(name: "somefont", size: 16.0)!,NSForegroundColorAttributeName : UIColor.whiteColor()]
我试图将下面的代码应用于当前自定义字体的粗体,我如何将它包含在字典中?设置NSFontAttributeName为加粗字体
let normalWhite = [NSFontAttributeName : UIFont(name: "somefont", size: 16.0)!,NSForegroundColorAttributeName : UIColor.whiteColor()]
我想你应该在你的Xcode中的自定义字体加粗文件,并写入它的名字一样Helvetica-Bold
目前还不清楚你在问什么。你想要将这些值添加到现有字典中,是吗? – l00phole
是的,这是正确的! –