LottieButton is dead simple UIButton subclass with support for playing Lottie-based animations between button's image view changes
To add an animation set the animationName
property. This will add a corresponding Lottie animation view as UIButton's subview.
Afterwards just call one of the 'playAnimation` methods to play the animation:
let lottieButton = LottieButton()
lottieButton.animationName = "animationName"
lottieButton.playAnimation()
That's it.
To run the example project, clone the repo, and run pod install
from the Example directory first.
iOS 8 and up.
LottieButton is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "LottieButton"
Ilya Alesker, ilya.alesker@gmail.com
LottieButton is available under the MIT license. See the LICENSE file for more info.