2.1版本2010年6月12日发布
1. UIImageView+WebCache 新增取消图片加载
@interface UIImageView (WebCache) <SDWebImageManagerDelegate>
- (void)setImageWithURL:(NSURL *)url;
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder;
//----------------------2.1版本更新-新增-取消图片加载--------------------
- (void)cancelCurrentImageLoad;
//------------------------------end----------------------------------
@end
//-----------------------2.1版本更新-取消图片加载-----------------------
- (void)cancelCurrentImageLoad{
[[SDWebImageManager sharedManager] cancelForDelegate:self];
}
//------------------------------end----------------------------------
2. SDImageCache 缓存器做了优化,兼容iPhone4增加了宏定义
//-----------------------2.1版本更新-系统版本兼容宏定义-----------------------
#ifdef __IPHONE_4_0
UIDevice *device = [UIDevice currentDevice];
if ([device respondsToSelector:@selector(isMultitaskingSupported)] && device.multitaskingSupported){
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(clearMemory)
name:UIApplicationDidEnterBackgroundNotification
object:nil];
}
#endif
//--------------------------------end--------------------------------
}
网友评论