Posts Tagged ‘NDData’

[iOS] NSData to NSString or UIImage

Thursday, June 24th, 2010

NSData to NSString

NSString *str = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];

NSData to UIImage

UIimage *img = [[UIImage alloc] initWithData:data];

refer to
>> エンコードを指定して、NSData <-> NSString を変換する
>> UIImageとNSDataの相互変換