[xcode] this class is not key value coding-compliant for the key

最近在研究swift
一開始看到的錯誤,也真的花了一點時間找到資訊
在這邊筆記一下

this class is not key value coding-compliant for the key
原因是因為设置IBAction和IBOutlet時有多餘或錯誤的連線
先找可能有問題的view 接著點右上角的 show the connections inspector


 把多出來的連線刪除
ex 假如 webview - View Controller 這個連線是錯誤的
把它刪除即可

沒有留言:

張貼留言