简体   繁体   中英

Set NSFontAttributeName to have bold font

我试图在以下代码上使用当前的自定义字体将其加粗,我如何将其包括在字典中?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM