Started from iOS 7 SDK , NSData class now has methods that help encode/decode base 64 data and string objects with the following:
- (instancetype)initWithBase64EncodedData:(NSData *)base64Data
options:(NSDataBase64DecodingOptions)options
- (instancetype)initWithBase64EncodedString:(NSString *)base64String
options:(NSDataBase64DecodingOptions)options
Once you got your NSData instances initialize a UIImage object with: + (UIImage *)imageWithData:(NSData *)data
types of encoding:
- NSDataBase64Encoding64CharacterLineLength
NSDataBase64Encoding76CharacterLineLength
NSDataBase64EncodingEndLineWithCarriageReturn
NSDataBase64EncodingEndLineWithLineFeed
types of decoding:
- NSDataBase64DecodingIgnoreUnknownCharacters