Skip to content

Dead simple UIButton subclass with Lottie animations

License

Notifications You must be signed in to change notification settings

nobre84/LottieButton

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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, [email protected]

License

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

About

Dead simple UIButton subclass with Lottie animations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 69.6%
  • Ruby 30.4%