我正在开发使用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的键值编码不兼容
发布评论