ITeye博客

setValue:forUndefinedKey

简单的茶 · 2013-10-15 09:54 · iOS · 移动开发 · Markdown

使用 Storyboard 创建并管理 UI 时,在运行 app 的时候出现了 2013-10-15 09:21:03.212 TestMSR *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: ': this class is not key value coding-compliant for the key star.'

  检查 storyboard 的 outlet 时也没发现自己连接过 star.....甚是奇怪。

  在此处http://stackoverflow.com/questions/9950938/setvalueforundefinedkey/12302157#12302157
 发现 了答案。
 原来是昨天创建过 star outlet ,后来把它删除了,但是 storyboard 的 source code 并没有更新。

solutions:  open .storyboard as source code, 删除关于 “star” 的 links,返回 xcode 重新编译。
问题解决!

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。