标签:ios 运行报错
self.model=[[DataModel alloc]init];程序运行之后就报错
*** Terminating app due to uncaught exception ‘NSUnknownKeyException‘, reason: ‘[<DataModel 0x7fe44bf22810> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key price.‘
检查之后发现self.myLabel.text=[self.model valueForKey:@"price"];改为self.myLabel.text=[NSString stringWithFormat:@"%@",[self.model valueForKey:@"price"]];即可
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<DataModel 0x7fe44b
标签:ios 运行报错
原文地址:http://blog.csdn.net/darongzi1314/article/details/45152607