diff --git a/SDWebImage/Core/SDDiskCache.h b/SDWebImage/Core/SDDiskCache.h index dc5e1fae..fbfd4a93 100644 --- a/SDWebImage/Core/SDDiskCache.h +++ b/SDWebImage/Core/SDDiskCache.h @@ -129,6 +129,7 @@ @property (nonatomic, strong, readonly, nonnull) SDImageCacheConfig *config; - (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; /** Move the cache directory from old location to new location, the old location will be removed after finish. diff --git a/SDWebImage/Core/SDImageTransformer.h b/SDWebImage/Core/SDImageTransformer.h index 3031bfe0..95d6b95c 100644 --- a/SDWebImage/Core/SDImageTransformer.h +++ b/SDWebImage/Core/SDImageTransformer.h @@ -69,6 +69,8 @@ FOUNDATION_EXPORT NSString * _Nullable SDThumbnailedKeyForKey(NSString * _Nullab @property (nonatomic, copy, readonly, nonnull) NSArray> *transformers; - (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; + + (nonnull instancetype)transformerWithTransformers:(nonnull NSArray> *)transformers; @end @@ -109,6 +111,8 @@ FOUNDATION_EXPORT NSString * _Nullable SDThumbnailedKeyForKey(NSString * _Nullab @property (nonatomic, strong, readonly, nullable) UIColor *borderColor; - (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; + + (nonnull instancetype)transformerWithRadius:(CGFloat)cornerRadius corners:(SDRectCorner)corners borderWidth:(CGFloat)borderWidth borderColor:(nullable UIColor *)borderColor; @end @@ -129,6 +133,8 @@ FOUNDATION_EXPORT NSString * _Nullable SDThumbnailedKeyForKey(NSString * _Nullab @property (nonatomic, assign, readonly) SDImageScaleMode scaleMode; - (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; + + (nonnull instancetype)transformerWithSize:(CGSize)size scaleMode:(SDImageScaleMode)scaleMode; @end @@ -144,6 +150,8 @@ FOUNDATION_EXPORT NSString * _Nullable SDThumbnailedKeyForKey(NSString * _Nullab @property (nonatomic, assign, readonly) CGRect rect; - (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; + + (nonnull instancetype)transformerWithRect:(CGRect)rect; @end @@ -164,6 +172,8 @@ FOUNDATION_EXPORT NSString * _Nullable SDThumbnailedKeyForKey(NSString * _Nullab @property (nonatomic, assign, readonly) BOOL vertical; - (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; + + (nonnull instancetype)transformerWithHorizontal:(BOOL)horizontal vertical:(BOOL)vertical; @end @@ -185,6 +195,8 @@ FOUNDATION_EXPORT NSString * _Nullable SDThumbnailedKeyForKey(NSString * _Nullab @property (nonatomic, assign, readonly) BOOL fitSize; - (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; + + (nonnull instancetype)transformerWithAngle:(CGFloat)angle fitSize:(BOOL)fitSize; @end @@ -202,6 +214,8 @@ FOUNDATION_EXPORT NSString * _Nullable SDThumbnailedKeyForKey(NSString * _Nullab @property (nonatomic, strong, readonly, nonnull) UIColor *tintColor; - (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; + + (nonnull instancetype)transformerWithColor:(nonnull UIColor *)tintColor; @end @@ -219,6 +233,8 @@ FOUNDATION_EXPORT NSString * _Nullable SDThumbnailedKeyForKey(NSString * _Nullab @property (nonatomic, assign, readonly) CGFloat blurRadius; - (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; + + (nonnull instancetype)transformerWithRadius:(CGFloat)blurRadius; @end @@ -235,6 +251,8 @@ FOUNDATION_EXPORT NSString * _Nullable SDThumbnailedKeyForKey(NSString * _Nullab @property (nonatomic, strong, readonly, nonnull) CIFilter *filter; - (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; + + (nonnull instancetype)transformerWithFilter:(nonnull CIFilter *)filter; @end diff --git a/SDWebImage/Core/SDWebImageCacheSerializer.h b/SDWebImage/Core/SDWebImageCacheSerializer.h index 12d31772..071931a7 100644 --- a/SDWebImage/Core/SDWebImageCacheSerializer.h +++ b/SDWebImage/Core/SDWebImageCacheSerializer.h @@ -33,4 +33,7 @@ typedef NSData * _Nullable(^SDWebImageCacheSerializerBlock)(UIImage * _Nonnull i - (nonnull instancetype)initWithBlock:(nonnull SDWebImageCacheSerializerBlock)block; + (nonnull instancetype)cacheSerializerWithBlock:(nonnull SDWebImageCacheSerializerBlock)block; +- (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; + @end diff --git a/SDWebImage/Core/SDWebImageDownloaderDecryptor.h b/SDWebImage/Core/SDWebImageDownloaderDecryptor.h index 0923f297..69eee7a4 100644 --- a/SDWebImage/Core/SDWebImageDownloaderDecryptor.h +++ b/SDWebImage/Core/SDWebImageDownloaderDecryptor.h @@ -38,6 +38,9 @@ A downloader response modifier class with block. /// @param block A block to control decrypt logic + (nonnull instancetype)decryptorWithBlock:(nonnull SDWebImageDownloaderDecryptorBlock)block; +- (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; + @end /// Convenience way to create decryptor for common data encryption. diff --git a/SDWebImage/Core/SDWebImageDownloaderRequestModifier.h b/SDWebImage/Core/SDWebImageDownloaderRequestModifier.h index 42c8a402..94009977 100644 --- a/SDWebImage/Core/SDWebImageDownloaderRequestModifier.h +++ b/SDWebImage/Core/SDWebImageDownloaderRequestModifier.h @@ -37,6 +37,9 @@ typedef NSURLRequest * _Nullable (^SDWebImageDownloaderRequestModifierBlock)(NSU /// @param block A block to control modifier logic + (nonnull instancetype)requestModifierWithBlock:(nonnull SDWebImageDownloaderRequestModifierBlock)block; +- (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; + @end /** diff --git a/SDWebImage/Core/SDWebImageDownloaderResponseModifier.h b/SDWebImage/Core/SDWebImageDownloaderResponseModifier.h index 63c1456e..009e6a18 100644 --- a/SDWebImage/Core/SDWebImageDownloaderResponseModifier.h +++ b/SDWebImage/Core/SDWebImageDownloaderResponseModifier.h @@ -37,6 +37,9 @@ typedef NSURLResponse * _Nullable (^SDWebImageDownloaderResponseModifierBlock)(N /// @param block A block to control modifier logic + (nonnull instancetype)responseModifierWithBlock:(nonnull SDWebImageDownloaderResponseModifierBlock)block; +- (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; + @end /** diff --git a/SDWebImage/Core/SDWebImageOptionsProcessor.h b/SDWebImage/Core/SDWebImageOptionsProcessor.h index 31ef153f..361dfed8 100644 --- a/SDWebImage/Core/SDWebImageOptionsProcessor.h +++ b/SDWebImage/Core/SDWebImageOptionsProcessor.h @@ -38,6 +38,9 @@ typedef SDWebImageOptionsResult * _Nullable(^SDWebImageOptionsProcessorBlock)(NS */ - (nonnull instancetype)initWithOptions:(SDWebImageOptions)options context:(nullable SDWebImageContext *)context; +- (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; + @end /** @@ -69,4 +72,7 @@ typedef SDWebImageOptionsResult * _Nullable(^SDWebImageOptionsProcessorBlock)(NS - (nonnull instancetype)initWithBlock:(nonnull SDWebImageOptionsProcessorBlock)block; + (nonnull instancetype)optionsProcessorWithBlock:(nonnull SDWebImageOptionsProcessorBlock)block; +- (nonnull instancetype)init NS_UNAVAILABLE; ++ (nonnull instancetype)new NS_UNAVAILABLE; + @end