Reputation: 1001
In AFNetworking 1.x
, we could use setImageWithURL
in a way like this:
NSURL* imageURL = [api urlForImageWithId:IdPhoto isThumb:NO];
[photoView setImageWithURL: imageURL];
}
where IdPhoto
is the Id of the Photo I am trying to load into an image view.
This code doesn't work in AFNetworking 2.0
. I think I have to use an AFImageResponseSerializer
in some way, but can't figure out how exactly to write the code.
Thanks
Upvotes: 0
Views: 1235
Reputation: 2962
To make this code work, you need to import <UIImageView+AFNetworking.h>
Upvotes: 3