Skip to content

Commit

Permalink
Update for #771 - instead of removing the old methods, deprecated the…
Browse files Browse the repository at this point in the history
…m so we are backwards compatible.
  • Loading branch information
bpoplauschi committed Jun 25, 2014
1 parent 6d01e80 commit 23874cd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SDWebImage/UIButton+WebCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,6 @@
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setBackgroundImageWithURL:forState:placeholderImage:completed:`");
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setBackgroundImageWithURL:forState:placeholderImage:options:completed:`");

- (void)cancelCurrentImageLoad __deprecated_msg("Use `cancelImageLoadForState:`");

@end
5 changes: 5 additions & 0 deletions SDWebImage/UIButton+WebCache.m
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,9 @@ - (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state pl
}];
}

- (void)cancelCurrentImageLoad {
// in a backwards compatible manner, cancel for current state
[self cancelImageLoadOperationWithKey:[NSString stringWithFormat:@"UIButtonImageOperation%@", @(self.state)]];
}

@end
2 changes: 2 additions & 0 deletions SDWebImage/UIImageView+WebCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,6 @@
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:placeholderImage:options:completed:`");
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:placeholderImage:options:progress:completed:`");

- (void)cancelCurrentArrayLoad __deprecated_msg("Use `cancelCurrentAnimationImagesLoad`");

@end
4 changes: 4 additions & 0 deletions SDWebImage/UIImageView+WebCache.m
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,8 @@ - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder opt

}

- (void)cancelCurrentArrayLoad {
[self cancelCurrentAnimationImagesLoad];
}

@end

0 comments on commit 23874cd

Please sign in to comment.