I have some NSData which is Base-64 encoded and I would like to decode it, I have seen an example that looks like this
NSData* myPNGData = [xmlS
This will work for ios7 and above.
- (UIImage *)decodeBase64ToImage:(NSString *)strEncodeData {
NSData *data = [[NSData alloc]initWithBase64EncodedString:strEncodeData options:NSDataBase64DecodingIgnoreUnknownCharacters];
return [UIImage imageWithData:data];
}
And use the code like this:
UIImage *img = [self decodeBase64ToImage:];