UIView+WebCacheOperation.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * This file is part of the SDWebImage package.
  3. * (c) Olivier Poitrey <rs@dailymotion.com>
  4. *
  5. * For the full copyright and license information, please view the LICENSE
  6. * file that was distributed with this source code.
  7. */
  8. #import "SDWebImageCompat.h"
  9. #if SD_UIKIT || SD_MAC
  10. #import "SDWebImageManager.h"
  11. @interface UIView (WebCacheOperation)
  12. /**
  13. * Set the image load operation (storage in a UIView based dictionary)
  14. *
  15. * @param operation the operation
  16. * @param key key for storing the operation
  17. */
  18. - (void)sd_setImageLoadOperation:(nullable id)operation forKey:(nullable NSString *)key;
  19. /**
  20. * Cancel all operations for the current UIView and key
  21. *
  22. * @param key key for identifying the operations
  23. */
  24. - (void)sd_cancelImageLoadOperationWithKey:(nullable NSString *)key;
  25. /**
  26. * Just remove the operations corresponding to the current UIView and key without cancelling them
  27. *
  28. * @param key key for identifying the operations
  29. */
  30. - (void)sd_removeImageLoadOperationWithKey:(nullable NSString *)key;
  31. @end
  32. #endif