NSUnkownException:此类与键piewTextField的键值编码不兼容

编程入门 行业动态 更新时间:2024-10-05 09:32:40
本文介绍了NSUnkownException:此类与键piewTextField的键值编码不兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在开发使用Xcode 4.6在ios5上部署的应用程序。我有一个单视图应用程序,我只是为新的View Controller 名称创建一个新的Objective-c类,'PiewController'我已经定义了 PiewController.h 文件,如下所示:

I am developing my app for Deployment on ios5 with Xcode 4.6 .I have a singleview app i am creating simply a new objective-c class for a new View Controller name 'PiewController' i have defined the PiewController.h file like this:

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

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

和文件所有者的连接为:

直接从 AppDelegate

and the Error it is giving when i have loaded PiewController Directly from AppDelegate

和AppDelegate看起来

推荐答案

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

Hmm it seems you want to connect the PViewController's xib stuffs to the ViewController. The debug message, i think, can be interpreted as : there is no property like piewTextField in ViewController (which is true, since you defined it in pviewController). Are you sure you load the correct xib for pviewController and not for the default initialized ViewController in AppDelegate.m?

更多推荐

NSUnkownException:此类与键piewTextField的键值编码不兼容

本文发布于:2023-11-26 18:59:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634796.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:此类   键值   不兼容   NSUnkownException   piewTextField

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!