From 05fc138bb1bc356563fdd6d8aaa2e923733f02ae Mon Sep 17 00:00:00 2001 From: onevcat Date: Tue, 8 Feb 2022 18:23:35 +0900 Subject: [PATCH] Set correct repeat count --- APNGKit/APNGImageView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/APNGKit/APNGImageView.swift b/APNGKit/APNGImageView.swift index f30d2f6..d4ffbcb 100644 --- a/APNGKit/APNGImageView.swift +++ b/APNGKit/APNGImageView.swift @@ -315,7 +315,7 @@ open class APNGImageView: APNGView { currentFrameIndex = 0 repeated = repeated + 1 - if image.repeatCount != RepeatForever && repeated >= image.repeatCount { + if image.repeatCount != RepeatForever && repeated > image.repeatCount { stopAnimating() // Stop in the last frame return