Open Xmanzn opened 8 years ago
@implementation SDWebImageManager
(id)sharedManager { static dispatch_once_t once; static id instance; dispatch_once(&once, ^{ instance = [self new]; }); return instance;
@dsxNiubility @ NSURLCache *cache = [NSURLCache sharedURLCache];
} 你在这里自己加的NSURLCache *cache = [NSURLCache sharedURLCache]; 有必要么
恩,可以直接去SDImageCache里取的。当时对原生的api比较熟,顺手就那么写了。
@implementation SDWebImageManager
(id)sharedManager { static dispatch_once_t once; static id instance; dispatch_once(&once, ^{ instance = [self new]; }); return instance;
@dsxNiubility @ NSURLCache *cache = [NSURLCache sharedURLCache];
} 你在这里自己加的NSURLCache *cache = [NSURLCache sharedURLCache]; 有必要么