AsyncImageView icon indicating copy to clipboard operation
AsyncImageView copied to clipboard

Image not Cache

Open keithyeohh opened this issue 12 years ago • 2 comments

Hey Nick,

I am not sure whether the implementation that I did is correct or not, the images not being cache every time when I re-run the app.

SingleDiscoverItemTVCell *cell = (SingleDiscoverItemTVCell *)[self.mainTableView dequeueReusableCellWithIdentifier:@"TVCellSingleDiscoverItem"];

if( cell == nil ){

    NSArray *nibs = [[NSBundle mainBundle] loadNibNamed:@"SingleDiscoverItemTVCell"
                                                  owner:(id)self
                                                options:nil];
    cell = (SingleDiscoverItemTVCell *)nibs[0];
}

else {

    [cell showImagePlaceholder];
    [[AsyncImageLoader sharedLoader] cancelLoadingImagesForTarget:cell.mainIV];
}
return cell;

cell.m

@property (nonatomic, weak) IBOutlet AsyncImageView *mainIV;

self.mainIV.imageURL = [NSURL URLWithString:@"the url"];

keithyeohh avatar Apr 15 '14 07:04 keithyeohh

AsyncImageView doesn't currently implement disk caching, so the cache won't survive an app restart.

nicklockwood avatar Apr 15 '14 08:04 nicklockwood

Got it, thanks Nick :)

keithyeohh avatar Apr 15 '14 08:04 keithyeohh