0
나는 픽업을 ViewController
에두고 레이블에 결과가 인쇄됩니다. 여기CoreData에 UILabel 결과 저장
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
mlabel.text= [arrayNo objectAtIndex:row];
}
코어에 라벨 결과를 저장하는 코드입니다 : 내가 오류 코드 여기
"[<__NSCFConstantString 0xf488> valueForUndefinedKey:]: this class is not key value coding-compliant for the key attribute.'.
을 받고, CoreData
에 결과를 저장하는 데 문제가 라벨을 출력 코드입니다 데이터 :
- (IBAction)editSaveButtonPressed:(id)sender
{
if (!currentCategory)
self.currentCategory = (Entity *)[NSEntityDescription insertNewObjectForEntityForName:@"Entity" inManagedObjectContext:self.managedObjectContext];
[self.currentCategory setAttribute:[mlabel text]]; //This is the line causing the error
NSError *error;
if (![self.managedObjectContext save:&error])
NSLog(@"Failed to add new category with error: %@", [error domain]);
[self.navigationController popViewControllerAnimated:YES];
}
왜이 오류가 발생합니까? 입력 해 주셔서 미리 감사드립니다.
감사합니다. 실제로 프로토콜에 대해 자습서를 확인하고 있으며 도움이 될만한 대표자가 있습니다. – PopUp