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
- Clone or download this repository using
git clone https://github.com/yandevelop/lottie-ios-arm64e - Run
./install_to_theos.sh. This will install Lottie to your Theos environment - In your Makefile add:
<YOUR_PROJECT>_FRAMEWORKS = Lottie- Add Lottie to the Depends list in your control file:
Depends: com.yan.lottieAfter installing you can import Lottie into your Swift files using the following line of code:
import LottieNow 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.
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
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.