iOS的用户界面连接到代码
问题描述:
我每次运行此代码它给Terminating app due to uncaught exception 'NSUnknownKeyException',setValue:forUndefinedKey:]: this class is not key value coding.'
的所有IM做的是连接button
到label
iOS的用户界面连接到代码
class ViewController: UIViewController {
@IBOutlet weak var lable: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func button(_ sender: Any) {
lable.text="done"
}
}
错误将被refered到class AppDelegate: UIResponder, UIApplicationDelegate
“我所做的一切都是将按钮连接到标签”。这到底意味着什么? – Adeel