gpt4 book ai didi

ios - 为什么单击按钮时会出现 NSUnknownKeyException?

转载 作者:行者123 更新时间:2023-11-29 02:08:45 27 4
gpt4 key购买 nike

app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key button_1.'

class ViewController: UIViewController {

@IBAction func button1_pressed(sender: AnyObject) {
NSLog("hello");
}

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.
}

最佳答案

您似乎没有定义导出(不再)。 Storyboard仍然认为有一个 @IBOutlet Weak var Button_1: UIButton? 但你显然已经删除了它。

关于ios - 为什么单击按钮时会出现 NSUnknownKeyException?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29496845/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com