Hey guys, is there a way to take a UIImage and store it temporalily as an NSString then decode it later to view elsewhere. I took the image and made it NSData then converted that to an NSString as shown in the code below:
And ImageString returns a value of weird characters, which I expected, but now when I go to add ImageString to another string using the stringWithFormat method it becomes a null value. Why? Or is there a better way to do this? Thanks.
Code:
NSData *imageData = UIImageJPEGRepresentation(imageView.image, 90);
NSString *imageString = [[NSString alloc] initWithData:imageData encoding:NSASCIIStringEncoding];
And ImageString returns a value of weird characters, which I expected, but now when I go to add ImageString to another string using the stringWithFormat method it becomes a null value. Why? Or is there a better way to do this? Thanks.