diff --git a/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m b/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m index 99fad4ecc4..0fdfb22655 100644 --- a/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m +++ b/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m @@ -30,6 +30,7 @@ #import #if PIN_ANIMATED_AVAILABLE + @interface ASPINRemoteImageDownloader () @end @@ -68,6 +69,19 @@ @end #endif +@interface ASPINRemoteImageManager : PINRemoteImageManager +@end + +@implementation ASPINRemoteImageManager + +//Share image cache with sharedImageManager image cache. +- (PINCache *)defaultImageCache +{ + return [[PINRemoteImageManager sharedImageManager] cache]; +} + +@end + @implementation ASPINRemoteImageDownloader + (instancetype)sharedDownloader @@ -82,7 +96,7 @@ - (PINRemoteImageManager *)sharedPINRemoteImageManager { - static PINRemoteImageManager *sharedPINRemoteImageManager = nil; + static ASPINRemoteImageManager *sharedPINRemoteImageManager = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ @@ -102,9 +116,9 @@ userInfo:nil]; @throw e; } - sharedPINRemoteImageManager = [[PINRemoteImageManager alloc] initWithSessionConfiguration:nil alternativeRepresentationProvider:self]; + sharedPINRemoteImageManager = [[ASPINRemoteImageManager alloc] initWithSessionConfiguration:nil alternativeRepresentationProvider:self]; #else - sharedPINRemoteImageManager = [[PINRemoteImageManager alloc] initWithSessionConfiguration:nil]; + sharedPINRemoteImageManager = [[ASPINRemoteImageManager alloc] initWithSessionConfiguration:nil]; #endif }); return sharedPINRemoteImageManager;