I am working on a UITableView that is very much like the iOS\'s native Photo app: it has many rows with 4 image thumbnails in each row. (i.e. each UITableViewCell has 4 UIIm
Add a subClass of NSValueTransformer for image in core data,
Code like follows:
+ (BOOL)allowsReverseTransformation {
return YES;
}
+ (Class)transformedValueClass {
return [NSData class];
}
- (id)transformedValue:(id)value {
return UIImageJPEGRepresentation(value, 0.5);
}
- (id)reverseTransformedValue:(id)value {
return [[UIImage alloc] initWithData:value];
}