Various fixes

This commit is contained in:
Ilya Laktyushin
2022-12-19 17:04:37 +04:00
parent 8a9a557870
commit 84bbf58e88
11 changed files with 54 additions and 18 deletions

View File

@@ -169,9 +169,13 @@ public final class AnimationNode : ASDisplayNode {
}
}
public func loop() {
public func loop(count: Int? = nil) {
if let animationView = self.animationView() {
animationView.loopMode = .loop
if let count = count {
animationView.loopMode = .repeat(Float(count))
} else {
animationView.loopMode = .loop
}
animationView.play()
}
}