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