【发布时间】:2014-10-23 20:11:55
【问题描述】:
我似乎无法更改我正在尝试制作的 Mac 应用程序中的文本标签。 我正在使用迅速。这是我正在使用的代码:
@IBOutlet var sumlab: NSTextField!
sumlab.text = "\(result.sum)" // result.sum is the result of a function I made
// I also tried this:
sumlab.text("\(result.sum)")
// and this:
sumlab.insertText("\(result.sum)")
这些似乎都不起作用,这是我完成程序需要解决的唯一问题。 附言当我写 sumlab.text 时,它说 NSTextField 没有名为 text 的成员
【问题讨论】:
标签: swift nstextfield