mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various fixes
This commit is contained in:
@@ -117,6 +117,12 @@ public final class AnimationNode: ASDisplayNode {
|
||||
self.animationView()?.currentProgress = progress
|
||||
}
|
||||
|
||||
public func animate(from: CGFloat, to: CGFloat, completion: @escaping () -> Void) {
|
||||
self.animationView()?.play(fromProgress: from, toProgress: to, completion: { _ in
|
||||
completion()
|
||||
})
|
||||
}
|
||||
|
||||
public func setAnimation(name: String, colors: [String: UIColor]? = nil) {
|
||||
self.currentParams = (name, colors)
|
||||
if let url = getAppBundle().url(forResource: name, withExtension: "json"), let animation = Animation.filepath(url.path) {
|
||||
|
||||
Reference in New Issue
Block a user