我使用SDWebImage
库,图片大约0.5 MB,点击detailView
后显示在UITableViewCell
。
详细视图中的代码:
- (void)configureView
{
if (self.imageURL)
{
[self.imageView setImageWithURL:self.imageURL placeholderImage:nil options:SDWebImageProgressiveDownload progress:^(NSUInteger receivedSize, long long expectedSize)
{
float percentDone = (float)receivedSize*200/(receivedSize+expectedSize);
[SVProgressHUD showWithStatus:[NSString stringWithFormat:@"Downloading... %0.0f%%", percentDone]];
if (percentDone == 100) {
[SVProgressHUD showSuccessWithStatus:@"Loaded."];
}
}
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType)
{
}];
}
}
- (void)viewDidLoad
{
[super viewDidLoad];
[self configureView];
}
图像是否太大(半兆字节)?
SDWebImage
缓存这些图片。
答案 0 :(得分:0)
你说你在viewDidUnload中发布了imageView.image但是在ios6上不推荐使用viewDidUnload。视图不再被卸载..该方法可能不会被调用:)
在didReceiveMemoryWarning
答案 1 :(得分:0)