diff --git a/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m b/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m index 956ff138bf..1c48cc0824 100644 --- a/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m +++ b/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m @@ -103,15 +103,10 @@ static ASPINRemoteImageDownloader *sharedDownloader = nil; + (void)setSharedImageManagerWithConfiguration:(nullable NSURLSessionConfiguration *)configuration { NSAssert(sharedDownloader == nil, @"Singleton has been created and session can no longer be configured."); - __unused PINRemoteImageManager *sharedManager = [[self class] sharedPINRemoteImageManagerWithConfiguration:configuration]; + __unused PINRemoteImageManager *sharedManager = [self sharedPINRemoteImageManagerWithConfiguration:configuration]; } -- (PINRemoteImageManager *)sharedPINRemoteImageManager -{ - return [self sharedPINRemoteImageManagerWithConfiguration:nil]; -} - -- (PINRemoteImageManager *)sharedPINRemoteImageManagerWithConfiguration:(NSURLSessionConfiguration *)configuration ++ (PINRemoteImageManager *)sharedPINRemoteImageManagerWithConfiguration:(NSURLSessionConfiguration *)configuration { static ASPINRemoteImageManager *sharedPINRemoteImageManager; static dispatch_once_t onceToken; @@ -141,6 +136,11 @@ static ASPINRemoteImageDownloader *sharedDownloader = nil; return sharedPINRemoteImageManager; } +- (PINRemoteImageManager *)sharedPINRemoteImageManager +{ + return [ASPINRemoteImageDownloader sharedPINRemoteImageManagerWithConfiguration:nil]; +} + - (BOOL)sharedImageManagerSupportsMemoryRemoval { static BOOL sharedImageManagerSupportsMemoryRemoval = NO;