From AddressBook's API ABPersonCopyImageData
I can get a CFDateRef which is toll-free bridge to NSData. And I want to write this data开发者_StackOverflow社区 to file, but what file extension should I use ?
.jpeg or .png?
The documentation doesn't mention what the data is.Is there any way to know?
NSData *imgData = (__bridge NSData *)ABPersonCopyImageData(person);
UIImage *img = [UIImage imageWithData:imgData];
if (!img) {
img = [UIImage imageNamed:@"noImage.png"];
}
精彩评论