diff --git a/SDWebImage/NSData+GIF.h b/SDWebImage/NSData+GIF.h index 556d7a27..9065bc67 100644 --- a/SDWebImage/NSData+GIF.h +++ b/SDWebImage/NSData+GIF.h @@ -10,6 +10,6 @@ @interface NSData (GIF) -- (BOOL)isGIF; +- (BOOL)sd_isGIF; @end diff --git a/SDWebImage/NSData+GIF.m b/SDWebImage/NSData+GIF.m index 3ed233cf..13f2e980 100644 --- a/SDWebImage/NSData+GIF.m +++ b/SDWebImage/NSData+GIF.m @@ -10,7 +10,7 @@ @implementation NSData (GIF) -- (BOOL)isGIF +- (BOOL)sd_isGIF { BOOL isGIF = NO; diff --git a/SDWebImage/SDImageCache.m b/SDWebImage/SDImageCache.m index df86c32b..5c7251ba 100644 --- a/SDWebImage/SDImageCache.m +++ b/SDWebImage/SDImageCache.m @@ -181,9 +181,9 @@ static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week NSData *data = [NSData dataWithContentsOfFile:path]; if (data) { - if ([data isGIF]) + if ([data sd_isGIF]) { - UIImage *image = [UIImage animatedGIFWithData:data]; + UIImage *image = [UIImage sd_animatedGIFWithData:data]; return [self scaledImageForKey:key image:image]; } else diff --git a/SDWebImage/SDWebImageDownloaderOperation.m b/SDWebImage/SDWebImageDownloaderOperation.m index b1717d35..9255411b 100644 --- a/SDWebImage/SDWebImageDownloaderOperation.m +++ b/SDWebImage/SDWebImageDownloaderOperation.m @@ -275,12 +275,12 @@ } else { - BOOL isImageGIF = [self.imageData isGIF]; + BOOL isImageGIF = [self.imageData sd_isGIF]; UIImage *image; if (isImageGIF) { - image = [UIImage animatedGIFWithData:self.imageData]; + image = [UIImage sd_animatedGIFWithData:self.imageData]; } else { diff --git a/SDWebImage/SDWebImageManager.m b/SDWebImage/SDWebImageManager.m index 825f7476..c5dafcdb 100644 --- a/SDWebImage/SDWebImageManager.m +++ b/SDWebImage/SDWebImageManager.m @@ -150,7 +150,7 @@ { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^ { - BOOL isImageGIF = [data isGIF]; + BOOL isImageGIF = [data sd_isGIF]; UIImage *transformedImage = isImageGIF ? downloadedImage : [self.delegate imageManager:self transformDownloadedImage:downloadedImage withURL:url]; dispatch_async(dispatch_get_main_queue(), ^ diff --git a/SDWebImage/UIImage+GIF.h b/SDWebImage/UIImage+GIF.h index 3006de58..1183035b 100755 --- a/SDWebImage/UIImage+GIF.h +++ b/SDWebImage/UIImage+GIF.h @@ -11,9 +11,9 @@ @interface UIImage (GIF) -+ (UIImage *)animatedGIFNamed:(NSString *)name; -+ (UIImage *)animatedGIFWithData:(NSData *)data; ++ (UIImage *)sd_animatedGIFNamed:(NSString *)name; ++ (UIImage *)sd_animatedGIFWithData:(NSData *)data; -- (UIImage *)animatedImageByScalingAndCroppingToSize:(CGSize)size; +- (UIImage *)sd_animatedImageByScalingAndCroppingToSize:(CGSize)size; @end diff --git a/SDWebImage/UIImage+GIF.m b/SDWebImage/UIImage+GIF.m index 8a0cc61d..fd1d8e43 100755 --- a/SDWebImage/UIImage+GIF.m +++ b/SDWebImage/UIImage+GIF.m @@ -11,7 +11,7 @@ @implementation UIImage (GIF) -+ (UIImage *)animatedGIFWithData:(NSData *)data ++ (UIImage *)sd_animatedGIFWithData:(NSData *)data { if (!data) { @@ -47,7 +47,7 @@ return [UIImage animatedImageWithImages:images duration:duration]; } -+ (UIImage *)animatedGIFNamed:(NSString *)name ++ (UIImage *)sd_animatedGIFNamed:(NSString *)name { CGFloat scale = [UIScreen mainScreen].scale; @@ -59,7 +59,7 @@ if (data) { - return [UIImage animatedGIFWithData:data]; + return [UIImage sd_animatedGIFWithData:data]; } NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:@"gif"]; @@ -68,7 +68,7 @@ if (data) { - return [UIImage animatedGIFWithData:data]; + return [UIImage sd_animatedGIFWithData:data]; } return [UIImage imageNamed:name]; @@ -81,14 +81,14 @@ if (data) { - return [UIImage animatedGIFWithData:data]; + return [UIImage sd_animatedGIFWithData:data]; } return [UIImage imageNamed:name]; } } -- (UIImage *)animatedImageByScalingAndCroppingToSize:(CGSize)size +- (UIImage *)sd_animatedImageByScalingAndCroppingToSize:(CGSize)size { if (CGSizeEqualToSize(self.size, size) || CGSizeEqualToSize(size, CGSizeZero)) {