Fix the SDAnimatedImageView's progressive animation bug, which reset the frame index to 0 each time new frames available
This commit is contained in:
parent
966e6c3ee4
commit
649665e1b0
|
@ -169,7 +169,7 @@
|
||||||
self.currentLoopCount = loopCount;
|
self.currentLoopCount = loopCount;
|
||||||
// Progressive image reach the current last frame index. Keep the state and pause animating. Wait for later restart
|
// Progressive image reach the current last frame index. Keep the state and pause animating. Wait for later restart
|
||||||
if (self.isProgressive) {
|
if (self.isProgressive) {
|
||||||
NSUInteger lastFrameIndex = self.player.totalFrameCount;
|
NSUInteger lastFrameIndex = self.player.totalFrameCount - 1;
|
||||||
[self.player seekToFrameAtIndex:lastFrameIndex loopCount:0];
|
[self.player seekToFrameAtIndex:lastFrameIndex loopCount:0];
|
||||||
[self.player pausePlaying];
|
[self.player pausePlaying];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue