有人可以向我解释为什么这不起作用:
CoreDataClass *classObject = (CoreDataClass *)[some method that returns a dictionary with exact KVC pairs that match CoreDataClass];
NSString *myString = classObject.stringProperty;
但这确实:
CoreDataClass *classObject = (CoreDataClass *)[some method that returns a dictionary with exact KVC pairs that match CoreDataClass];
NSString *myString = [classObject valueForKey:@"stringProperty"];
编辑:将字典转换为我的 NSManagedObjectClass CoreDataClass 以便我可以直接访问属性的最简单方法是什么?