LOTAnimationCache.h 775 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // LOTAnimationCache.h
  3. // Lottie
  4. //
  5. // Created by Brandon Withrow on 1/9/17.
  6. // Copyright © 2017 Brandon Withrow. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @class LOTComposition;
  11. @interface LOTAnimationCache : NSObject
  12. /// Global Cache
  13. + (instancetype)sharedCache;
  14. /// Adds animation to the cache
  15. - (void)addAnimation:(LOTComposition *)animation forKey:(NSString *)key;
  16. /// Returns animation from cache.
  17. - (LOTComposition * _Nullable)animationForKey:(NSString *)key;
  18. /// Removes a specific animation from the cache
  19. - (void)removeAnimationForKey:(NSString *)key;
  20. /// Clears Everything from the Cache
  21. - (void)clearCache;
  22. /// Disables Caching Animation Model Objects
  23. - (void)disableCaching;
  24. @end
  25. NS_ASSUME_NONNULL_END