#import "SDWebImageManager.h"
AppDelegate.m
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application
{
//因为我们用SDWebImage框架下载的图片
//停止下载所有图片
[[SDWebImageManager sharedManager] cancelAll];
//清除内存中的图片
[[SDWebImageManager sharedManager].imageCache clearMemory];
}
本文介绍如何在iOS应用中使用SDWebImage框架来管理图片下载和缓存,并提供了AppDelegate.m中的具体实现代码,包括如何取消所有图片下载任务及清理内存中的缓存图片。
1147

被折叠的 条评论
为什么被折叠?



