Hello!
How can I add a fade in effect when the image is retrieved?
BTW, the sample project does not work, it seems
is missing in
UIImage+WebP.h
and vender/libwebp folder is empty.
I donwloaded the project as a ZIP file right now.
Thanks.
use completed block
[photoImgeView setImageWithURL:[NSURL URLWithString:photoPath]
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType) {
if (cacheType == SDImageCacheTypeNone) {
photoImgeView.alpha = 0;
[UIView animateWithDuration:0.3 animations:^{
photoImgeView.alpha = 1;
}];
} else {
photoImgeView.alpha = 1;
}
}];
Works perfectly! Thanks.
One question regarding memory management, isn't it there a retain cycle in photoImgeView?
I mean, try to change photoImgeView by cell.photoImgeView.
Thanks.
It works fine with UITableViewCell.
Thanks.
It worked thanks @asuralyc
How to change white fadein background for this? Currently fadein is white i want it black or grey?
Most helpful comment
use completed block