【发布时间】:2015-05-20 08:15:54
【问题描述】:
我正在尝试将此文本的填充设置为白色,但填充是透明的,当我更改 NSForegroundAttribureName 时,它没有效果下面是我的代码。
let textAttributes = [
NSFontAttributeName : UIFont(name: "HelveticaNeue-CondensedBlack", size: 40)!,
NSStrokeWidthAttributeName : 3.0,
NSForegroundColorAttributeName : UIColor.whiteColor(),
NSStrokeColorAttributeName : UIColor.blackColor()
]
在 viewDidLoad() 中
textFieldTop.defaultTextAttributes = textAttributes
如何将字体填充为白色?
【问题讨论】: