我正在使用iWatch应用程序,但出现以下错误:
“ WKInterfaceLabel”没有名为“ text”的成员
出口:
@IBOutlet var numField: WKInterfaceLabel!
导致错误的相关代码块:
func updateDisplay() {
// If the value is an integer, don't show a decimal point
var iAcc = Int(accumulator)
if accumulator - Double(iAcc) == 0 {
numField.text = "\(iAcc)"
} else {
numField.text = "\(accumulator)"
}
特别:
numField.text = "\(iAcc)"
和
numField.text = "\(accumulator)"
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句