Skip to content

Sini921/lottie-ios-arm64e

 
 

Repository files navigation

Lottie

Lottie is an iOS library to natively render After Effects vector animations. This fork of Lottie is compiled for jailbroken iOS devices.

For more information about the official Lottie project, please visit here

Installation

  1. Clone or download this repository using git clone https://github.com/yandevelop/lottie-ios-arm64e
  2. Run ./install_to_theos.sh. This will install Lottie to your Theos environment
  3. In your Makefile add:
<YOUR_PROJECT>_FRAMEWORKS = Lottie
  1. Add Lottie to the Depends list in your control file:
Depends: com.yan.lottie

Usage

After installing you can import Lottie into your Swift files using the following line of code:

import Lottie

Now you need to create an instance of LottieAnimationView and add it to the view controller's view.

let animationFilePath = "animation.json" // Replace with path to your json animation

let animationView: LottieAnimationView = LottieAnimationView(filepath: animationFilePath)
animationView.frame = self.view.frame
animationView.playbackMode = .loop
animationView.contentMode = .scaleAspectFit

self.addSubview(animationView)

animationView.play { finished in
    // Animation stopped playing
}

This will add a LottieAnimationView to your view controller's view, which will play the specified Lottie animation in a loop. The play method also accepts a closure that is called when the animation finishes playing.

For more detailed instructions and additional features, please refer to the official Lottie documentation.

Using Lottie from Objective-C

Lottie can also be used from Objective-C by creating a Swift wrapper class around the LottieAnimationView. For examples of how to do this, please refer to the following repositories: lottie-bridging-tweak and lottie-bridging-app

License

This project is licensed under the Apache License 2.0. The original Lottie project is also licensed under the Apache License 2.0. View the original license here.

About

An iOS library to natively render After Effects vector animations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Swift 99.8%
  • Other 0.2%