reason:[<xx項(xiàng)目名.xxController> setValue:forUndefinedKey]:this class is not key value coding-compliant for the key xx
Xcode控制臺(tái)報(bào)這個(gè)錯(cuò)誤的時(shí)候,說明IBAction和IBOutlet有多余或者錯(cuò)誤的連線。
解決方法:
1.在storyboard上選中(點(diǎn)擊黃色圈圈)reason中提及的xxController
2.點(diǎn)擊屬性欄最右邊的show the connections inspector(箭頭)那里,將顯示黃色感嘆號(hào)的刪去重新連接即可。