Classes

The following classes are available globally.

Pipeline

  • Pipeline transformer. Which you can bind multiple transformers together to let the image to be transformed one by one in order and generate the final image.

    Note

    Because transformers are lightweight, if you want to append or arrange transformers, create another pipeline transformer instead. This class is considered as immutable.
    See more

    Declaration

    Objective-C

    @interface SDImagePipelineTransformer : NSObject <SDImageTransformer>

    Swift

    class SDImagePipelineTransformer : NSObject, SDImageTransformer

Image Geometry

Image Blending

Image Effect

Activity Indicator

Progress Indicator

  • Progress indicator class. for UIKit(macOS), it use a UIProgressView. for AppKit(macOS), it use a NSProgressIndicator with the bar style.

    See more

    Declaration

    Objective-C

    @interface SDWebImageProgressIndicator : NSObject <SDWebImageIndicator>

    Swift

    class SDWebImageProgressIndicator : NSObject, SDWebImageIndicator
  • A combined operation representing the cache and loader operation. You can use it to cancel the load process.

    See more

    Declaration

    Objective-C

    @interface SDWebImageCombinedOperation : NSObject <SDWebImageOperation>

    Swift

    class SDWebImageCombinedOperation : NSObject, SDWebImageOperation
    • The SDWebImageManager is the class behind the UIImageView+WebCache category and likes.
    • It ties the asynchronous downloader (SDWebImageDownloader) with the image cache store (SDImageCache).
    • You can use this class directly to benefit from web image downloading with caching in another context than
    • a UIView. *
    • Here is a simple example of how to use SDWebImageManager: *
    • “`

    SDWebImageManager *manager = [SDWebImageManager sharedManager]; [manager loadImageWithURL:imageURL options:0 progress:nil completed:^(UIImage *image, NSData *data, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { if (image) { // do something with image } }];

    • ”`
    See more

    Declaration

    Objective-C

    @interface SDWebImageManager : NSObject

    Swift

    class SDWebImageManager : NSObject
  • The options result contains both options and context.

    See more

    Declaration

    Objective-C

    @interface SDWebImageOptionsResult : NSObject

    Swift

    class SDWebImageOptionsResult : NSObject
  • A options processor class with block.

    See more

    Declaration

    Objective-C

    @interface SDWebImageOptionsProcessor : NSObject <SDWebImageOptionsProcessor>

    Swift

    class SDWebImageOptionsProcessor : NSObject, SDWebImageOptionsProcessorProtocol
  • A token represents a list of URLs, can be used to cancel the download.

    See more

    Declaration

    Objective-C

    @interface SDWebImagePrefetchToken : NSObject <SDWebImageOperation>

    Swift

    class SDWebImagePrefetchToken : NSObject, SDWebImageOperation
  • Prefetch some URLs in the cache for future use. Images are downloaded in low priority.

    See more

    Declaration

    Objective-C

    @interface SDWebImagePrefetcher : NSObject

    Swift

    class SDWebImagePrefetcher : NSObject
  • This class is used to provide a transition animation after the view category load image finished. Use this on sd_imageTransition in UIView+WebCache.h for UIKit(iOS & tvOS), we use +[UIView transitionWithView:duration:options:animations:completion] for transition animation. for AppKit(macOS), we use +[NSAnimationContext runAnimationGroup:completionHandler:] for transition animation. You can call +[NSAnimationContext currentContext] to grab the context during animations block.

    Note

    These transition are provided for basic usage. If you need complicated animation, consider to directly use Core Animation or use SDWebImageAvoidAutoSetImage and implement your own after image load finished.
    See more

    Declaration

    Objective-C

    @interface SDWebImageTransition : NSObject

    Swift

    class SDWebImageTransition : NSObject