mod: animated test 33

This commit is contained in:
Insomnia 2020-11-20 17:04:14 +08:00
parent c69e80286b
commit 6ecc8c5541
1 changed files with 3 additions and 2 deletions

View File

@ -640,14 +640,15 @@ static BOOL _isCalled;
__weak SDAnimatedImagePlayer *player = imageView.player;
player.playbackMode = SDAnimatedImagePlaybackModeReverse;
__block NSUInteger i = player.totalFrameCount - 1;
__block NSInteger i = player.totalFrameCount - 1;
[player setAnimationFrameHandler:^(NSUInteger index, UIImage * _Nonnull frame) {
expect(index).equal(i);
expect(frame).notTo.beNil();
i--;
if (index == 0) {
[expectation fulfill];
return;
}
i--;
}];
[player startPlaying];