From 44e80816f0e9b8b6390b3c9bbf4d4f67eb0d26e3 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Fri, 4 Aug 2017 19:00:23 +0800 Subject: [PATCH] Fix SDWebImage v4 can not import libwebp framework's header files. Fix FLAnimatedImageView mixed local and global import --- .../FLAnimatedImage/FLAnimatedImageView+WebCache.h | 2 +- .../FLAnimatedImage/FLAnimatedImageView+WebCache.m | 1 - SDWebImage/UIImage+WebP.m | 9 ++++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/SDWebImage/FLAnimatedImage/FLAnimatedImageView+WebCache.h b/SDWebImage/FLAnimatedImage/FLAnimatedImageView+WebCache.h index 656a58ba..678ddccc 100644 --- a/SDWebImage/FLAnimatedImage/FLAnimatedImageView+WebCache.h +++ b/SDWebImage/FLAnimatedImage/FLAnimatedImageView+WebCache.h @@ -13,7 +13,7 @@ #if __has_include() #import #else -#import "FLAnimatedImageView.h" +#import "FLAnimatedImage.h" #endif #import "SDWebImageManager.h" diff --git a/SDWebImage/FLAnimatedImage/FLAnimatedImageView+WebCache.m b/SDWebImage/FLAnimatedImage/FLAnimatedImageView+WebCache.m index 04a1c858..1a74cfad 100644 --- a/SDWebImage/FLAnimatedImage/FLAnimatedImageView+WebCache.m +++ b/SDWebImage/FLAnimatedImage/FLAnimatedImageView+WebCache.m @@ -13,7 +13,6 @@ #import "UIView+WebCacheOperation.h" #import "UIView+WebCache.h" #import "NSData+ImageContentType.h" -#import "FLAnimatedImage.h" #import "UIImageView+WebCache.h" @implementation FLAnimatedImageView (WebCache) diff --git a/SDWebImage/UIImage+WebP.m b/SDWebImage/UIImage+WebP.m index 7d7d19a0..13389fb8 100644 --- a/SDWebImage/UIImage+WebP.m +++ b/SDWebImage/UIImage+WebP.m @@ -9,10 +9,17 @@ #ifdef SD_WEBP #import "UIImage+WebP.h" +#import "NSImage+WebCache.h" + +#if __has_include() && __has_include() && __has_include() +#import +#import +#import +#else #import "webp/decode.h" #import "webp/mux_types.h" #import "webp/demux.h" -#import "NSImage+WebCache.h" +#endif #import "objc/runtime.h"