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

Loading an image from cache locally #101

Open
royherma opened this issue Jul 17, 2016 · 1 comment
Open

Loading an image from cache locally #101

royherma opened this issue Jul 17, 2016 · 1 comment

Comments

@royherma
Copy link

How might one load an image from cache locally? Will this way work -

//Save the image to cache and attach to key
[imageView hnk_setImage:image withKey:key];

//Loading
[imageView hnk_setImage:nil withKey:key];

Thanks!

@brendand
Copy link

I know this is an old question, but I solved this problem by doing this:

[self.cellImage hnk_setImage:nil
		withKey:digestKey
		placeholder:placeholderImage
		 success:nil
		 failure:^(NSError *error) {
			 UIImage *originalImage = [[UIImage alloc] initWithData:attachment.content];
			 [weakSelf.cellImage hnk_setImage:originalImage
						withKey:digestKey
						placeholder:placeholderImage];
	}];

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