SDWebImage
2016-07-22 16:54:02 0 举报
SDWebImage是一个用于处理图片的iOS库,它提供了一种简单、高效的方式来加载和缓存网络图片。通过使用SDWebImage,开发者可以轻松地在应用程序中显示图片,而无需担心内存占用和性能问题。SDWebImage支持异步加载图片,这意味着在加载图片时,用户界面仍然可以保持流畅。此外,SDWebImage还提供了丰富的功能,如图片裁剪、缩放、旋转等,以满足不同场景的需求。总之,SDWebImage是一个强大且易于使用的iOS图片处理库,可以帮助开发者快速实现高质量的图片展示功能。
作者其他创作
大纲/内容
SDWebImageCombinedOperation(Singleton)
SDImageCache *imageCacheSDWebImageDownloader *imageDownloaderNSMutableSet *failedURLsNSMutableArray *runningOperations
- self.runningOperations addObject:operation
SDWebImageManager(Singleton)
- (SDImageCache *)createCache- (id )downloadImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionWithFinishedBlock)completedBlockcacheKeyForURL- (id )downloadImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionWithFinishedBlock)completedBlock- (NSString *)cacheKeyForURL:(NSURL *)url- (NSOperation *)queryDiskCacheForKey:(NSString *)key done:(SDWebImageQueryCompletedBlock)doneBlock
实例化
UIImageView (WebCache)
- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock
SDImageCache(Singleton)
+ (SDImageCache *)sharedImageCache(Singleton method)- (id)initWithNamespace:(NSString *)ns (init Property)-(NSString *)makeDiskCachePath:(NSString*)fullNamespace- (NSString *)cachedFileNameForKey:(NSString *)key (MD5 secret)#public method- (NSString *)defaultCachePathForKey:(NSString *)key- (NSString *)cachePathForKey:(NSString *)key inPath:(NSString *)path#notification method- (void)clearMemory- (void)clearDisk- (void)backgroundCleanDisk
0 条评论
下一页