UIImageJPEGRepresentation会导致透明底变为白底
UIImagePNGRepresentation替换
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:item.iconUrl]];
[imageView setImageWithURLRequest:request placeholderImage:nil success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image) {
NSData *data = UIImagePNGRepresentation(image);
[FileManager saveCacheImgWith:data imgName:[NSString stringWithFormat:@"%ld",(long)item.itemId] path:[FileManager getDeviceIconExaplePath] fileExtension:@"png"];
NSLog(@"下载成功 %@", item.itemName);
} failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error) {
NSLog(@"下载失败 %@", item.itemName);
}];