FinalViewWithSending *newView = [[FinalViewWithSending alloc]initWithNibName:@"FinalViewWithSending" bundle:nil];
newView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:newView animated:YES]; //it crashes here with a thread 1 error, SIGABRT error..上面写着:
"Terminating app due to uncaught exception 'NSUnknownKeyException',
reason: '[<FinalViewWithSending 0x1bef70> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key loginButton.'"没有名为loginButton的变量,所以我不确定为什么我会得到一个错误...
谢谢
发布于 2012-03-31 06:19:47
您将收到错误,因为没有名为loginButton的属性。检查您的.xib文件。几乎可以肯定的是,指定loginButton的FinalViewWithSending对象(很可能是文件的所有者)的链接是错误的,即使它不存在于类代码中。
发布于 2012-09-06 22:17:01
菲利普·米尔斯是对的。
在这里,对于任何搜索的人来说,答案是编辑故事板并删除任何指向指定的未定义键的链接。你必须在外部编辑器中编辑序列图像板文件:右键单击层次结构中的序列图像板列表,然后单击“在查找器中显示”或其他选项。在文本编辑器中打开,通过搜索删除所述链接,保存并返回到Xcode。没有更多的问题。
当您不正确地从视图控制器中删除某些内容时,就会发生这种情况。
发布于 2012-09-28 18:15:33
同意这一点-菲利普·米尔斯是正确的。
有人提到在文本编辑器中打开故事板--这是不必要的。
只需单击情节提要,转到Connections Inspector。如果你有一个有问题的插座,你会在插座旁边看到一个感叹号。把它删掉。
https://stackoverflow.com/questions/9950938
复制相似问题