This commit is contained in:
Insomnia 2020-10-28 18:13:00 +08:00
parent 184c8768fa
commit aa89511c74
2 changed files with 13 additions and 4 deletions

View File

@ -140,9 +140,7 @@
#pragma mark - State Control #pragma mark - State Control
- (void)setupCurrentFrame { - (void)setupCurrentFrame {
if (self.playbackMode == SDAnimatedImagePlaybackModeReversedBounce) { if (self.playbackMode == )
self.currentFrameIndex = self.totalFrameCount - 1;
}
if ([self.animatedProvider isKindOfClass:[UIImage class]]) { if ([self.animatedProvider isKindOfClass:[UIImage class]]) {
UIImage *image = (UIImage *)self.animatedProvider; UIImage *image = (UIImage *)self.animatedProvider;

View File

@ -23,6 +23,7 @@
NSRunLoopMode _runLoopMode; NSRunLoopMode _runLoopMode;
NSUInteger _maxBufferSize; NSUInteger _maxBufferSize;
double _playbackRate; double _playbackRate;
SDAnimatedImagePlaybackMode _playbackMode;
} }
@property (nonatomic, strong, readwrite) UIImage *currentFrame; @property (nonatomic, strong, readwrite) UIImage *currentFrame;
@ -241,6 +242,16 @@
return _playbackRate; return _playbackRate;
} }
- (void)setPlaybackMode:(SDAnimatedImagePlaybackMode)playbackMode {
_playbackMode = playbackMode;
self.player.playbackMode = playbackMode;
}
- (SDAnimatedImagePlaybackMode)playbackMode {
return _playbackMode;
}
- (BOOL)shouldIncrementalLoad - (BOOL)shouldIncrementalLoad
{ {
if (!_initFinished) { if (!_initFinished) {