/LottieButton

Dead simple UIButton subclass with Lottie animations

Primary LanguageSwiftMIT LicenseMIT

LottieButton

CI Status Version License Platform

LottieButton is dead simple UIButton subclass with support for playing Lottie-based animations between button's image view changes

Usage

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.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 8 and up.

Installation

LottieButton is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "LottieButton"

Author

Ilya Alesker, ilya.alesker@gmail.com

License

LottieButton is available under the MIT license. See the LICENSE file for more info.