diff --git a/Configs/App-Shared.xcconfig b/Configs/App-Shared.xcconfig index 84f0056c..96b230ee 100644 --- a/Configs/App-Shared.xcconfig +++ b/Configs/App-Shared.xcconfig @@ -6,3 +6,4 @@ // Name of an asset catalog app icon set whose contents will be merged into the `Info.plist`. ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon +_EXPERIMENTAL_SWIFT_EXPLICIT_MODULES = NO diff --git a/Configs/Docc.xcconfig b/Configs/Docc.xcconfig new file mode 100644 index 00000000..bbe36396 --- /dev/null +++ b/Configs/Docc.xcconfig @@ -0,0 +1,5 @@ +RUN_DOCUMENTATION_COMPILER = YES +DOCC_EXTRACT_SWIFT_INFO_FOR_OBJC_SYMBOLS = YES +DOCC_ENABLE_CXX_SUPPORT = YES +DOCC_EXTRACT_EXTENSION_SYMBOLS = YES +OTHER_DOCC_FLAGS= --transform-for-static-hosting diff --git a/SDWebImage/Core/SDImageCoder.h b/SDWebImage/Core/SDImageCoder.h index 571f757c..373fc17d 100644 --- a/SDWebImage/Core/SDImageCoder.h +++ b/SDWebImage/Core/SDImageCoder.h @@ -11,6 +11,7 @@ #import "NSData+ImageContentType.h" #import "SDImageFrame.h" +/// Image Decoding/Encoding Options typedef NSString * SDImageCoderOption NS_STRING_ENUM; typedef NSDictionary SDImageCoderOptions; typedef NSMutableDictionary SDImageCoderMutableOptions; diff --git a/SDWebImage/Core/SDImageLoader.h b/SDWebImage/Core/SDImageLoader.h index 5ecec5d6..62ddc8e5 100644 --- a/SDWebImage/Core/SDImageLoader.h +++ b/SDWebImage/Core/SDImageLoader.h @@ -59,7 +59,7 @@ FOUNDATION_EXPORT id _Nullable SDImageLoaderGetProgress /** This function set the progressive decoder for current loading operation. If no progressive decoding is happended, pass nil. - @param operation The loading operation to associate the progerssive decoder. + @param progressiveCoder The loading operation to associate the progerssive decoder. */ FOUNDATION_EXPORT void SDImageLoaderSetProgressiveCoder(id _Nonnull operation, id _Nullable progressiveCoder); diff --git a/SDWebImage/Core/SDWebImageDefine.h b/SDWebImage/Core/SDWebImageDefine.h index 52fac3df..c1c69d72 100644 --- a/SDWebImage/Core/SDWebImageDefine.h +++ b/SDWebImage/Core/SDWebImageDefine.h @@ -9,6 +9,7 @@ #import "SDWebImageCompat.h" typedef void(^SDWebImageNoParamsBlock)(void); +/// Image Loading context option typedef NSString * SDWebImageContextOption NS_EXTENSIBLE_STRING_ENUM; typedef NSDictionary SDWebImageContext; typedef NSMutableDictionary SDWebImageMutableContext; diff --git a/SDWebImage/Core/SDWebImageManager.h b/SDWebImage/Core/SDWebImageManager.h index fcac52ea..1219ce3b 100644 --- a/SDWebImage/Core/SDWebImageManager.h +++ b/SDWebImage/Core/SDWebImageManager.h @@ -162,7 +162,7 @@ SDWebImageManager *manager = [SDWebImageManager sharedManager]; @note If you use `transformer`, `cacheKeyFilter` or `cacheSerializer` property of manager, the input context option already apply those properties before passed. This options processor is a better replacement for those property in common usage. For example, you can control the global options, based on the URL or original context option like the below code. - @code + * @code SDWebImageManager.sharedManager.optionsProcessor = [SDWebImageOptionsProcessor optionsProcessorWithBlock:^SDWebImageOptionsResult * _Nullable(NSURL * _Nullable url, SDWebImageOptions options, SDWebImageContext * _Nullable context) { // Only do animation on `SDAnimatedImageView` if (!context[SDWebImageContextAnimatedImageClass]) { @@ -179,7 +179,7 @@ SDWebImageManager *manager = [SDWebImageManager sharedManager]; return [[SDWebImageOptionsResult alloc] initWithOptions:options context:context]; }]; - @endcode + * @endcode */ @property (nonatomic, strong, nullable) id optionsProcessor; diff --git a/SDWebImage/Core/UIImage+Transform.m b/SDWebImage/Core/UIImage+Transform.m index 824fd0f8..88189be8 100644 --- a/SDWebImage/Core/UIImage+Transform.m +++ b/SDWebImage/Core/UIImage+Transform.m @@ -536,6 +536,7 @@ static inline CGImageRef _Nullable SDCreateCGImageFromCIImage(CIImage * _Nonnull #pragma mark - Image Blending +#if SD_UIKIT || SD_MAC static NSString * _Nullable SDGetCIFilterNameFromBlendMode(CGBlendMode blendMode) { // CGBlendMode: https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_images/dq_images.html#//apple_ref/doc/uid/TP30001066-CH212-CJBIJEFG // CIFilter: https://developer.apple.com/library/archive/documentation/GraphicsImaging/Reference/CoreImageFilterReference/index.html#//apple_ref/doc/uid/TP30000136-SW71 @@ -625,6 +626,7 @@ static NSString * _Nullable SDGetCIFilterNameFromBlendMode(CGBlendMode blendMode } return filterName; } +#endif - (nullable UIImage *)sd_tintedImageWithColor:(nonnull UIColor *)tintColor { return [self sd_tintedImageWithColor:tintColor blendMode:kCGBlendModeSourceIn]; diff --git a/SDWebImage/Core/UIView+WebCacheState.h b/SDWebImage/Core/UIView+WebCacheState.h index f3801c28..52763875 100644 --- a/SDWebImage/Core/UIView+WebCacheState.h +++ b/SDWebImage/Core/UIView+WebCacheState.h @@ -11,10 +11,11 @@ /** A loading state to manage View Category which contains multiple states. Like UIImgeView.image && UIImageView.highlightedImage - @code + + * @code SDWebImageLoadState *loadState = [self sd_imageLoadStateForKey:@keypath(self, highlitedImage)]; NSProgress *highlitedImageProgress = loadState.progress; - @endcode + * @endcode */ @interface SDWebImageLoadState : NSObject