rs/SDWebImage — Issue #62: Caching and SDNetworkActivityIndicator
Author: WrightsCS
Created: 2012-01-25 22:46:35+00:00
State: open

My issue is in reference to using Kirby Turner's Photo Browser and SDNetworkActivityIndicator.

When scrolling through the Photo gallery, the first few photos were cached, and no activity indicator was necessary.

After an unknown index, (presumably where the cache stopped downloading?) the activity indicator shows on every photo swipe. Here is a video of the issue at hand: http://www.wrightscs.com/video/caching_issue.mov

I discovered this issue because I had to implement an indicator while images were downloading on 3G. The hud screen appears in place of the activity indicator, so this is my startActivity method:

- (void)startActivity
{
@synchronized(self)
{
if (counter == 0)
{
/*
[[NSNotificationCenter defaultCenter] postNotificationName:/*SDWebImageDownloadStartNotification*/@"startCaching" object:nil];
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
}
counter++;
}
}

Without implementing anymore classes (i.e. the prefetch class), how can I show this indicator only when the images are downloading? Clearly in the video, the images are already downloaded when the indicator shows on every single swipe.