【发布时间】:2015-05-05 23:06:48
【问题描述】:
我收到以下错误
属性字符串 'String' 包含的 NSFontAttributeName 不是 UIFont (SanFranciscoDisplay-Light)。已移除
这对我来说没有任何意义,因为根据这个它应该是有效的字体。 http://iosfonts.com。这是我的代码。
atrString = NSAttributedString(string: atrString.string, attributes:
[NSForegroundColorAttributeName: UIColor.lightGrayColor(),
NSFontAttributeName:"SanFranciscoDisplay-Light"])
我正在尝试从我的手表套件代码中访问 San Francisco 字体。任何提示或建议表示赞赏。
【问题讨论】:
-
您是否检查过该字体和样式的字符串名称是否正确?
-
我转到上面的链接并输入了完全相同的字体。