pod try RJImageLoader opens broken project.
- trying out pod in app, animation runs once, then on second run it is inversed and finally after that it's completely gone.
I made a small video: http://cl.ly/1y0G1p050o0M. I think the problem is in SDWebImage:
self.photoImageView.image = nil;
[self.photoImageView startLoaderWithTintColor:[UIColor blueColor]];
NSLog(@"Start loader");
__weak typeof(self) weakSelf = self;
[self.photoImageView sd_setImageWithURL:url
placeholderImage:nil
options:SDWebImageRetryFailed | SDWebImageRefreshCached
progress:^(NSInteger receivedSize, NSInteger expectedSize) {
dispatch_async(dispatch_get_main_queue(), ^{
CGFloat percent = (CGFloat)receivedSize / expectedSize;
[weakSelf.photoImageView updateImageDownloadProgress:percent];
NSLog(@"Update progress = %f", percent);
});
}
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
[weakSelf.photoImageView reveal];
NSLog(@"Reveal loader");
}];
I posted couple of issues in SDWebImage related to this problem. SDWebImage/SDWebImage#1090
Since SDWebImage is a wreck, we can avoid completion handler and run all animations in progress block:
self.photoImageView.image = nil;
[self.photoImageView startLoaderWithTintColor:[UIColor blueColor]];
NSLog(@"Start loader");
__weak typeof(self) weakSelf = self;
[self.photoImageView sd_setImageWithURL:url
placeholderImage:nil
options:SDWebImageRetryFailed | SDWebImageRefreshCached
progress:^(NSInteger receivedSize, NSInteger expectedSize) {
dispatch_async(dispatch_get_main_queue(), ^{
CGFloat percent = (CGFloat)receivedSize / expectedSize;
[weakSelf.photoImageView updateImageDownloadProgress:percent];
NSLog(@"Update progress = %f", percent);
if(receivedSize == expectedSize) {
[weakSelf.photoImageView reveal];
}
});
}
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
}];
But then it's all broken after I run it twice, see video: http://cl.ly/2U192i321D1N
pod try RJImageLoaderopens broken project.I made a small video: http://cl.ly/1y0G1p050o0M. I think the problem is in SDWebImage:
I posted couple of issues in SDWebImage related to this problem. SDWebImage/SDWebImage#1090
Since SDWebImage is a wreck, we can avoid completion handler and run all animations in progress block:
But then it's all broken after I run it twice, see video: http://cl.ly/2U192i321D1N