this's my PictureDataTransformer.m
#import "PictureDataTransformer.h"
@implementation PictureDataTransformer
+(Class)transformedValueClass
{
return [NSData class];
}
+(BOOL)allowsReverseTransformation
{
return YES;
}
-(id)transformedValue:(id)value
{
return UIImagePNGRepresetation(value);
}
error Implicit declaration of function 'UIImagePNGRepresetation' is invalid in C99 Implicit conversion of 'int' to 'id' is disallowed with ARC
-(id)reverseTransformedValue:(id)value
{
UIImage *image = [UIImage imageWithData:value];
}
error 2 Use of undeclared identifier 'UIImage' return image;
@end
and I have 2 errors and I don't know why
Looks like you've made a typo in UIImagePNGRepresentation - you're missing an "n".
Also, the undeclared identifier issue makes me think that you haven't imported UIKit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With