RetriableSDWebImage 1.0.4

RetriableSDWebImage 1.0.4

Maintained by retriable.



 
Depends on:
SDWebImage>= 0
Retriable>= 0
 

  • By
  • retriable

RetriableSDWebImage

License MIT Build Status Carthage compatible Pod Version Pod Platform

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;
        }
    }];