Formal deprecate the SDWebImageContextCustomManager context option
This commit is contained in:
parent
f0388739b6
commit
2abb8d0628
|
@ -213,9 +213,9 @@ FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextSetIma
|
||||||
|
|
||||||
/**
|
/**
|
||||||
A SDWebImageManager instance to control the image download and cache process using in UIImageView+WebCache category and likes. If not provided, use the shared manager (SDWebImageManager *)
|
A SDWebImageManager instance to control the image download and cache process using in UIImageView+WebCache category and likes. If not provided, use the shared manager (SDWebImageManager *)
|
||||||
@note Consider deprecated. This context options can be replaced by other context option control like `.imageCache`, `.imageLoader`, `.imageTransofmer` (See below), which already matches all the properties in SDWebImageManager.
|
@deprecated Deprecated. This context options can be replaced by other context option control like `.imageCache`, `.imageLoader`, `.imageTransofmer` (See below), which already matches all the properties in SDWebImageManager.
|
||||||
*/
|
*/
|
||||||
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextCustomManager;
|
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextCustomManager __deprecated_msg("Use individual context option like .imageCache, .imageLoader and .imageTransformer instead");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
A id<SDImageCache> instance which conforms to `SDImageCache` protocol. It's used to override the image mananger's cache during the image loading pipeline.
|
A id<SDImageCache> instance which conforms to `SDImageCache` protocol. It's used to override the image mananger's cache during the image loading pipeline.
|
||||||
|
|
|
@ -80,11 +80,13 @@ const int64_t SDWebImageProgressUnitCountUnknown = 1LL;
|
||||||
[self sd_startImageIndicator];
|
[self sd_startImageIndicator];
|
||||||
id<SDWebImageIndicator> imageIndicator = self.sd_imageIndicator;
|
id<SDWebImageIndicator> imageIndicator = self.sd_imageIndicator;
|
||||||
#endif
|
#endif
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
SDWebImageManager *manager = context[SDWebImageContextCustomManager];
|
SDWebImageManager *manager = context[SDWebImageContextCustomManager];
|
||||||
if (!manager) {
|
if (!manager) {
|
||||||
manager = [SDWebImageManager sharedManager];
|
manager = [SDWebImageManager sharedManager];
|
||||||
}
|
}
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
SDImageLoaderProgressBlock combinedProgressBlock = ^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
|
SDImageLoaderProgressBlock combinedProgressBlock = ^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
|
||||||
if (imageProgress) {
|
if (imageProgress) {
|
||||||
|
|
Loading…
Reference in New Issue