【问题标题】:Set NSFontAttributeName to have bold font将 NSFontAttributeName 设置为粗体
【发布时间】:2015-10-18 10:58:49
【问题描述】:

我试图在以下代码上应用当前自定义字体加粗,我如何将它包含在字典中?

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

【问题讨论】:

  • 不清楚你在问什么。您想将这些值添加到现有字典中,是吗?

标签: ios swift nsfont


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2011-03-30
    • 1970-01-01
    • 2015-09-23
    • 1970-01-01
    • 1970-01-01
    • 2020-09-24
    • 2013-12-16
    • 2012-10-29
    • 2014-09-21
    相关资源
    最近更新 更多