gpt4 book ai didi

ios - 此类对于 key screenNumber 不符合键值编码

转载 作者:行者123 更新时间:2023-12-02 08:16:45 26 4
gpt4 key购买 nike

我有 2 台计算机在 Xcode 中运行相同的 iOS 代码(在 dropbox 文件夹中)。
创建 UIViewController 时,它在一台机器上正常工作,而另一台机器给出:此类对于关键 screenNumber 不符合键值编码。

我在代码中绝对没有 screenNumber 的引用,并且对于这个特定的类,没有使用任何 Storyboard,也没有使用 xib。

初始化 View 的命令:

ChildViewController *childViewController = [[ChildViewController alloc] initWithIndex:index :100];

它在此代码中的随机位置崩溃:

 -(ChildViewController *)initWithIndex:(int)index :(int)maximumIndex
{
self = [super init];

if (self)
{
NSLog(@"Init child:%d",index);
// Custom initialization

self.index=index;
maxIndex=maximumIndex;
}

return self;
}

ChildViewController 派生自 UIViewController。
收到的错误消息是:

*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ChildViewController 0x8e0f4d0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key screenNumber.'

知道我是否可以在不在项目目录中的另一个文件夹中找到 screenNumber 引用吗?我不排除我过去可能使用过这个变量,但现在不再使用了。

谢谢

最佳答案

好的,找到问题了。模拟器中仍然有旧文件。删除了 home/Preferences/Application Support/iPhone Simulator/7.1/Applications/。

关于ios - 此类对于 key screenNumber 不符合键值编码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24872498/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com