应用程序因未捕获的异常而终止
我的应用程序工作正常,直到我向选项卡栏控制器添加另一个选项卡。我收到了 SIGABRT。然后我撤消了一切以尝试让它再次工作,现在得到这个
***
由于未捕获的异常“NSUnknownKeyException”而终止应用程序,原因:“[ setValue:forUndefinedKey:]:此类与键视图的键值编码不兼容。”
有人可以帮忙吗?
My app was working fine until I added another tab to the tab bar controller. I got SIGABRT. Then I undid everything to try and get it working again and now get this
***
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
Can anyone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Interface Builder 中打开您的 xib 文件,看看是否有 IBOutlet 在您之前删除选项卡时断开连接。它正在尝试连接一个可能已不存在的插座。
[UIRuntimeOutletConnection 连接]
Open your xib file(s) in Interface Builder and see if there are IBOutlets that got disconnected when you deleted your tab before. It's trying to connect an outlet that probably doesn't exist anymore.
[UIRuntimeOutletConnection connect]
您正在使用 NSDictionary 吗?
确保您正在使用可变对象。如果您插入 NSDictionary(而不是 NS*Mutable*Dictionary),则可能会发生此错误。
如果没有,也许你的选项卡控件间接使用字典
Are you working with a NSDictionary ?
Be sure that you're working with Mutable object. This error can happen if you're inserting into a NSDictionary (instead of a NS*Mutable*Dictionary).
If not, maybe youre tab control indirectly use Dictionary