[_loadImageViewsetShowActivityIndicatorView:YES]; [_loadImageViewsetIndicatorStyle:UIActivityIndicatorViewStyleGray]; _loadImageView.contentMode = UIV
[_loadImageViewsetShowActivityIndicatorView:YES];
[_loadImageViewsetIndicatorStyle:UIActivityIndicatorViewStyleGray];
_loadImageView.contentMode = UIViewContentModeScaleAspectFill;
[_loadImageViewsd_setImageWithURL:self.imageUrlplaceholderImage:nil];
// 緩存圖片
SDWebImageManager *manager = [SDWebImageManagersharedManager];
manager.delegate = self;
[manager.imageDownloaderdownloadImageWithURL:self.imageUrloptions:SDWebImageDownloaderContinueInBackgroundprogress:^(NSInteger receivedSize, NSInteger expectedSize) {
} completed:^(UIImage *image, NSData *data, NSError *error, BOOL finished) {
NSLog(@"---save image is %@",image);
[manager.imageCachestoreImage:image forKey:@"one"toDisk:YES]; }]; // 從緩存取圖片並顯示
SDWebImageManager *manager = [[SDWebImageManageralloc] init]; UIImage *image = [manager.imageCacheimageFromMemoryCacheForKey:@"one"];