「Objective-C」NSData をNSString に変換するメモ

1.NSData型-> NSString型
NSString *cftStr = [[NSString alloc] initWithData:data
encoding:NSUTF8StringEncoding];
2.NSString型 -> NSData型
NSData *cft = [string dataUsingEncoding:NSUTF8StringEncoding];

Objective-C

Posted by arkgame