SDImageLoadersManager

@interface SDImageLoadersManager : NSObject <SDImageLoader>

A loaders manager to manage multiple loaders

  • Returns the global shared loaders manager instance. By default we will set [SDWebImageDownloader.sharedDownloader] into the loaders array.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nonnull, class) SDImageLoadersManager *sharedManager;

    Swift

    class var shared: SDImageLoadersManager { get }
  • All image loaders in manager. The loaders array is a priority queue, which means the later added loader will have the highest priority

    Declaration

    Objective-C

    @property (copy, nonatomic, nullable) NSArray<id<SDImageLoader>> *loaders;

    Swift

    var loaders: [SDImageLoader]? { get set }
  • Add a new image loader to the end of loaders array. Which has the highest priority.

    Declaration

    Objective-C

    - (void)addLoader:(nonnull id<SDImageLoader>)loader;

    Swift

    func addLoader(_ loader: SDImageLoader)

    Parameters

    loader

    loader

  • Remove an image loader in the loaders array.

    Declaration

    Objective-C

    - (void)removeLoader:(nonnull id<SDImageLoader>)loader;

    Swift

    func removeLoader(_ loader: SDImageLoader)

    Parameters

    loader

    loader