Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image not Cache #47

Open
keithyeohh opened this issue Apr 15, 2014 · 2 comments
Open

Image not Cache #47

keithyeohh opened this issue Apr 15, 2014 · 2 comments

Comments

@keithyeohh
Copy link

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"];
@nicklockwood
Copy link
Owner

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

@keithyeohh
Copy link
Author

Got it, thanks Nick :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants