Skip to content

Implement image downloader for CKNetworkImageComponent (ComponentKit) with SDWebImage

Notifications You must be signed in to change notification settings

nhuomtv/CKNetworkImageComponent-SDWebImage

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

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];

About

Implement image downloader for CKNetworkImageComponent (ComponentKit) with SDWebImage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 100.0%