xcode – setValue:forUndefinedKey:]:
发布时间:2020-12-15 01:53:45 所属栏目:百科 来源:网络整理
导读:FinalViewWithSending *newView = [[FinalViewWithSending alloc]initWithNibName:@"FinalViewWithSending" bundle:nil];newView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;[self presentModalViewController:newView animated:YES]; //
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的变量,所以我不知道为什么我得到一个错误… 谢谢 解决方法
你收到错误,因为没有名为loginButton的属性。检查你的.xib文件。一个FinalViewWithSending对象(可能是File的所有者)几乎肯定是一个错误的链接,它指定了loginButton,即使它不存在于类代码中。
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |