UIImageView+HBHttpCache.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // UIImageView+HBHttpCache.h
  3. // MyTest
  4. //
  5. // Created by weqia on 13-8-22.
  6. // Copyright (c) 2013年 weqia. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "HBHttpImageDownloader.h"
  10. typedef enum {
  11. UIImageViewLayoutNone=0,
  12. UIImageViewLayoutClick,
  13. UIImageViewLayoutLimit
  14. }UIImageViewLayoutType;
  15. @interface UIImageView (HBHttpCache)
  16. -(void) setImageWithURL:(NSString*)url;
  17. -(void) setImageWithURL:(NSString*)url
  18. layout:(UIImageViewLayoutType)layout;
  19. -(void) setImageWithURL:(NSString *)url
  20. layout:(UIImageViewLayoutType)layout
  21. placeholderImage:(UIImage*)placeholderImage;
  22. -(void) setImageWithURL:(NSString *)url
  23. layout:(UIImageViewLayoutType)layout
  24. placeholderImage:(UIImage*)placeholderImage
  25. process:(HBHttpImageDownloaderProcessBlock) process
  26. complete:(HBHttpImageDownloaderCompleteBlock)complete;
  27. -(void) setImageWithURL:(NSString *)url
  28. layout:(UIImageViewLayoutType)layout
  29. placeholderImage:(UIImage*)placeholderImage
  30. process:(HBHttpImageDownloaderProcessBlock)process
  31. complete:(HBHttpImageDownloaderCompleteBlock)complete
  32. option:(HBHttpImageDownloaderOption)option;
  33. -(void) setImageWithIndirectURL:(NSString *)indirectURL;
  34. -(void) setImageWithIndirectURL:(NSString *)indirectURL
  35. layout:(UIImageViewLayoutType)layout;
  36. -(void) setImageWithIndirectURL:(NSString *)indirectURL
  37. layout:(UIImageViewLayoutType)layout
  38. placeholderImage:(UIImage *)placeholderImage;
  39. -(void) setImageWithIndirectURL:(NSString *)indirectURL
  40. layout:(UIImageViewLayoutType)layout
  41. placeholderImage:(UIImage *)placeholderImage
  42. process:(HBHttpImageDownloaderProcessBlock)process
  43. complete:(HBHttpImageDownloaderCompleteBlock)complete;
  44. -(void) setImageWithIndirectURL:(NSString *)indirectURL
  45. layout:(UIImageViewLayoutType)layout
  46. placeholderImage:(UIImage *)placeholderImage
  47. process:(HBHttpImageDownloaderProcessBlock)process
  48. complete:(HBHttpImageDownloaderCompleteBlock)complete
  49. option:(HBHttpImageDownloaderOption)option;
  50. -(void) setImageWithCacheKey:(NSString *)key layout:(UIImageViewLayoutType)layout
  51. placeholderImage:(UIImage *)placeholderImage;
  52. @end