I have these two methods. How do I call them?
//to base 64 string
-(NSString *)getStringFromImage:(UIImage *)image{
if(image){
NSData *dataObj = UIImagePNGRepresentation(image);
return [dataObj base64Encoding];
} else {
return @"";
}
}
//Convert back
// NSData *dataObj = [NSData dataWithBase64EncodedString:beforeStringImage];
// UIImage *beforeImage = [UIImage imageWithData:dataObj];
If you want to call the method from same class, you could call like as follows:
Else, if you want call the method from different class, then do as follows:
Assume
clInstancebe the instance of the class having that method, then