Update UIImage+MultiFormat.m
fix <Error>: ImageIO: CGImageSourceCreateWithData data parameter is nil bug
This commit is contained in:
parent
91b4251115
commit
be0791233c
|
@ -18,6 +18,10 @@
|
|||
@implementation UIImage (MultiFormat)
|
||||
|
||||
+ (UIImage *)sd_imageWithData:(NSData *)data {
|
||||
if (!data) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
UIImage *image;
|
||||
NSString *imageContentType = [NSData sd_contentTypeForImageData:data];
|
||||
if ([imageContentType isEqualToString:@"image/gif"]) {
|
||||
|
|
Loading…
Reference in New Issue