LOTCacheProvider.h 690 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // LOTCacheProvider.h
  3. // Lottie
  4. //
  5. // Created by punmy on 2017/7/8.
  6. //
  7. //
  8. #import <Foundation/Foundation.h>
  9. #if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
  10. #import <UIKit/UIKit.h>
  11. @compatibility_alias LOTImage UIImage;
  12. @protocol LOTImageCache;
  13. #pragma mark - LOTCacheProvider
  14. @interface LOTCacheProvider : NSObject
  15. + (id<LOTImageCache>)imageCache;
  16. + (void)setImageCache:(id<LOTImageCache>)cache;
  17. @end
  18. #pragma mark - LOTImageCache
  19. /**
  20. This protocol represent the interface of a image cache which lottie can use.
  21. */
  22. @protocol LOTImageCache <NSObject>
  23. @required
  24. - (LOTImage *)imageForKey:(NSString *)key;
  25. - (void)setImage:(LOTImage *)image forKey:(NSString *)key;
  26. @end
  27. #endif