Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 1.03 KB

File metadata and controls

34 lines (28 loc) · 1.03 KB

CKNetworkImageComponent-SDWebImage

Implement image downloader for CKNetworkImageComponent (ComponentKit) with SDWebImage.

Usage:

Declare image downloader as property.

@interface IAWTimelineContext ()

@property (strong, nonatomic, readwrite) IAWCKImageDownloader *imageDownloader;

@end

Create and assign image downloader for context:

+ (instancetype)context {
	

	itemContext.imageDownloader = [IAWCKImageDownloader sharedManager];
	
	
}

And create network image component with image downloader.

CKComponent *avatarComponent = [CKNetworkImageComponent newWithURL:avatarURL
	                                                   imageDownloader:context.imageDownloader
	                                                         scenePath:nil
	                                                              size:{ AVATAR_SIZE, AVATAR_SIZE }
	                                                           options:options
	                                                        attributes:attributes];