【发布时间】:2016-09-11 02:49:24
【问题描述】:
Xcode 8.0
我尝试为 watchOS 编写我的第一个应用程序。我只是想在按下按钮时显示一个注释。这是我到目前为止所得到的:
import WatchKit
import Foundation
class InterfaceController: WKInterfaceController {
@IBOutlet var myLabel: WKInterfaceLabel!
@IBAction func getNote(){
print("button pushed")
myLabel.text = "here is your note"
}
我已经尝试过不同的方法,但我一直坚持在显示屏上显示笔记。最新的错误说“类型“WKInterfaceLabel”的值没有成员“文本””
有什么想法吗?非常感谢!
【问题讨论】:
标签: watchkit watchos watchos-3 wkinterfacelabel