123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- #import "SDWebImageCompat.h"
- #import "SDImageCoder.h"
- @protocol SDAnimatedImage <SDAnimatedImageProvider>
- @required
- - (nullable instancetype)initWithData:(nonnull NSData *)data scale:(CGFloat)scale options:(nullable SDImageCoderOptions *)options;
- - (nullable instancetype)initWithAnimatedCoder:(nonnull id<SDAnimatedImageCoder>)animatedCoder scale:(CGFloat)scale;
- @optional
- - (void)preloadAllFrames;
- - (void)unloadAllFrames;
- @property (nonatomic, assign, readonly, getter=isAllFramesLoaded) BOOL allFramesLoaded;
- @property (nonatomic, strong, readonly, nullable) id<SDAnimatedImageCoder> animatedCoder;
- @end
- @interface SDAnimatedImage : UIImage <SDAnimatedImage>
- + (nullable instancetype)imageNamed:(nonnull NSString *)name;
- #if __has_include(<UIKit/UITraitCollection.h>)
- + (nullable instancetype)imageNamed:(nonnull NSString *)name inBundle:(nullable NSBundle *)bundle compatibleWithTraitCollection:(nullable UITraitCollection *)traitCollection;
- #else
- + (nullable instancetype)imageNamed:(nonnull NSString *)name inBundle:(nullable NSBundle *)bundle;
- #endif
- + (nullable instancetype)imageWithContentsOfFile:(nonnull NSString *)path;
- + (nullable instancetype)imageWithData:(nonnull NSData *)data;
- + (nullable instancetype)imageWithData:(nonnull NSData *)data scale:(CGFloat)scale;
- - (nullable instancetype)initWithContentsOfFile:(nonnull NSString *)path;
- - (nullable instancetype)initWithData:(nonnull NSData *)data;
- - (nullable instancetype)initWithData:(nonnull NSData *)data scale:(CGFloat)scale;
- @property (nonatomic, assign, readonly) SDImageFormat animatedImageFormat;
- @property (nonatomic, copy, readonly, nullable) NSData *animatedImageData;
- @property (nonatomic, readonly) CGFloat scale;
- - (void)preloadAllFrames;
- - (void)unloadAllFrames;
- @property (nonatomic, assign, readonly, getter=isAllFramesLoaded) BOOL allFramesLoaded;
- @end
|