iphone - NS未知异常: this class is not key value coding-compliant for the key piewTextField

标签 iphone ios cocoa-touch

我正在使用 Xcode 4.6 开发用于在 ios5 上部署的应用程序。我有一个单 View 应用程序,我正在为新的 View Controller 创建一个新的 objective-c 类 name 'PiewController' 我已经这样定义了 PiewController.h 文件:

PiewController.h

我的 PiewController.m 看起来像这样

PiewController.m

和我的PiewController.xib看起来像这样

PiewController.xib

File's Owner 的连接是:

Connections

以及当我直接从 AppDelegate 加载 PiewController 时出现的错误 enter image description here

AppDelegate 看起来像 enter image description here

最佳答案

嗯,看来您想将 PViewController 的 xib 内容连接到 ViewController。我认为调试消息可以解释为:在 ViewController 中没有像 piewTextField 这样的属性(这是真的,因为你在 pviewController 中定义了它)。您确定为 pviewController 加载正确的 xib 而不是为 AppDelegate.m 中默认初始化的 ViewController 加载吗?

关于iphone - NS未知异常: this class is not key value coding-compliant for the key piewTextField,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16406892/

相关文章:

ios - Xcode 运行成功但归档时出错

ios - "No .app bundles found in the package"

iphone - 当其父 View 从外部弹出时如何关闭 UIAlertView?

ios - 更改标签栏的颜色

ios - NSMutableArray 移除 objectAtIndex NSRangeException IOS

ios - 从 iOS 应用程序在服务器上实现动态搜索的最佳方式是什么?

cocoa-touch - 为什么表格 View 单元格中的自动布局会导致表格的内容大小错误地更改?

iphone - iPhone Facebook 3.0 主页制作攻略

iphone - XCode 4 未找到有效的签名身份

iphone - CHCSVParser - 如何从网络服务器加载