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

how can get the image data without useUIImageView #86

Open
loumzy opened this issue Aug 24, 2015 · 1 comment
Open

how can get the image data without useUIImageView #86

loumzy opened this issue Aug 24, 2015 · 1 comment

Comments

@loumzy
Copy link

loumzy commented Aug 24, 2015

No description provided.

@qhu91it
Copy link

qhu91it commented Jun 15, 2017

To download the image without UIImageView, import HNKNetworkFetcher

#import "HNKNetworkFetcher.h"

declare it, if declare local inside a function, the function fetchImageWithSuccess maybe not work because weakself is nil.

@property (strong, nonatomic) id<HNKFetcher> fetcher;

and call func fetchImageWithSuccess

self.fetcher = [[HNKNetworkFetcher alloc] initWithURL:url];
[self.fetcher fetchImageWithSuccess:^(UIImage *image) {
    if (image) {
        // image download ok
    }
} failure:nil];

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