|
@@ -31,8 +31,6 @@
|
|
|
// The name and characters used in the demo of this software are property of their
|
|
// The name and characters used in the demo of this software are property of their
|
|
|
// respective owners.
|
|
// respective owners.
|
|
|
|
|
|
|
|
-#if !os(watchOS)
|
|
|
|
|
-
|
|
|
|
|
#if canImport(UIKit)
|
|
#if canImport(UIKit)
|
|
|
import UIKit
|
|
import UIKit
|
|
|
import ImageIO
|
|
import ImageIO
|
|
@@ -534,10 +532,11 @@ extension AnimatedImageView {
|
|
|
|
|
|
|
|
private func incrementCurrentFrameIndex() {
|
|
private func incrementCurrentFrameIndex() {
|
|
|
currentFrameIndex = increment(frameIndex: currentFrameIndex)
|
|
currentFrameIndex = increment(frameIndex: currentFrameIndex)
|
|
|
- if isReachMaxRepeatCount && isLastFrame {
|
|
|
|
|
- isFinished = true
|
|
|
|
|
- } else if currentFrameIndex == 0 {
|
|
|
|
|
|
|
+ if isLastFrame {
|
|
|
currentRepeatCount += 1
|
|
currentRepeatCount += 1
|
|
|
|
|
+ if isReachMaxRepeatCount {
|
|
|
|
|
+ isFinished = true
|
|
|
|
|
+ }
|
|
|
delegate?.animator(self, didPlayAnimationLoops: currentRepeatCount)
|
|
delegate?.animator(self, didPlayAnimationLoops: currentRepeatCount)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -612,5 +611,3 @@ class SafeArray<Element> {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
#endif
|
|
#endif
|
|
|
-
|
|
|
|
|
-#endif
|
|
|