RetriableSDWebImage
Retriable SDWebImage
Cocoapods
Add the following to your project's Podfile:
pod 'RetriableSDWebImage'
Carthage
Add the following to your project's Cartfile:
github "retriable/RetriableSDWebImage"
Example
[imageView sd_setImageWithURL:[NSURL URLWithString:@"https://nr-platform.s3.amazonaws.com/uploads/platform/published_extension/branding_icon/275/AmazonS3.png"] placeholderImage:nil options:0 progress:nil completed:nil retryAfter:^NSTimeInterval( NSInteger currentRetryTime, NSError *latestError) {
if (![latestError.domain isEqualToString:NSURLErrorDomain]) return 0;
switch (latestError.code) {
case NSURLErrorTimedOut:
case NSURLErrorNetworkConnectionLost:
case NSURLErrorNotConnectedToInternet: return 5;
default: return 0;
}
}];