[ad_1]
I’m utilizing an AnimatedButton from Lottie framework and it really works wonderful however the one downside I’ve is that animation stops taking part in as soon as the AnimatedButton is clicked, once I need the button to animate on a regular basis, even after the press.
let middleButton = AnimatedButton()
middleButton.body.measurement = CGSize(width: 80, peak: 80)
middleButton.animation = Animation.named("eye")
middleButton.animationView.play()
middleButton.animationView.loopMode = .autoReverse
middleButton.animationView.backgroundBehavior = .pauseAndRestore
middleButton.addTarget(self, motion: #selector(self.middleButtonAction), for: .touchUpInside)
[ad_2]
