hi
I have added SDWebimage to my project and RJImageLoader which displays the loading of image as a circle
in viewdidLoad method it works fine and display the circular loading of image
[self.imageView startLoaderWithTintColor:[UIColor orangeColor]];
__weak typeof(self)weakSelf = self;
[self.imageView sd_setImageWithURL:url placeholderImage:nil options:SDWebImageContinueInBackground | SDWebImageRefreshCached progress:^(NSInteger receivedSize, NSInteger expectedSize) {
[weakSelf.imageView updateImageDownloadProgress:(CGFloat)receivedSize/expectedSize];
} completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
[weakSelf.imageView reveal];
}];but when i add swipe gesture and add the array of elements it loads the image but does not display that circular loader!
I even tried to add it in dispatch_main or background thread but still hav ethe problem
-(void)showImageAtIndex:(NSInteger)index
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{
NSString *myURL=[[_imagesData objectAtIndex:index] objectForKey:@"Photo"];
NSString *fullURL=[siteURL stringByAppendingString:myURL];
NSString *final = [fullURL stringByReplacingOccurrencesOfString:@"_small" withString:@""];
NSURL *url=[NSURL URLWithString:final];
dispatch_async(dispatch_get_main_queue(), ^{
_LikeResult.text = @"";
[self.imageView startLoaderWithTintColor:[UIColor orangeColor]];
__weak typeof(self)weakSelf = self;
[self.imageView sd_setImageWithURL:url placeholderImage:nil options:SDWebImageContinueInBackground | SDWebImageRefreshCached progress:^(NSInteger receivedSize, NSInteger expectedSize) {
[weakSelf.imageView updateImageDownloadProgress:(CGFloat)receivedSize/expectedSize];
} completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
[weakSelf.imageView reveal];
}];
});
});