airbnb/lottie-ios


An iOS library to natively render After Effects vector animations

http://airbnb.io/lottie/

License: Apache-2.0

Language: Swift

Keywords: animation, bodymovin, custom-transitions, ios, ios-animation, ios-transition, keyframes, transition-animation


Lottie for iOS, macOS (and Android and React Native)

VersionLicensePlatform

View documentation, FAQ, help, examples, and more at airbnb.io/lottie

Lottie is a mobile library for Android and iOS that natively renders vector based animations and art in realtime with minimal code.

Lottie loads and renders animations and vectors exported in the bodymovin JSON format. Bodymovin JSON can be created and exported from After Effects with bodymovin, Sketch with Lottie Sketch Export, and from Haiku.

For the first time, designers can create and ship beautiful animations without an engineer painstakingly recreating it by hand. Since the animation is backed by JSON they are extremely small in size but can be large in complexity! Animations can be played, resized, looped, sped up, slowed down, reversed, and even interactively scrubbed. Lottie can play or loop just a portion of the animation as well, the possibilities are endless! Animations can even be changed at runtime in various ways! Change the color, position or any keyframable value! Lottie also supports native UIViewController Transitions out of the box!

Here is just a small sampling of the power of Lottie

Example1 Example2

Example3

Abcs

Installing Lottie

Lottie supports CocoaPods and Carthage (Both dynamic and static). Lottie is written in Swift 4.2.

Github Repo

You can pull the Lottie Github Repo and include the Lottie.xcodeproj to build a dynamic or static library.

CocoaPods

Add the pod to your Podfile:

pod 'lottie-ios'

And then run:

pod install

After installing the cocoapod into your project import Lottie with

import Lottie

Carthage

Add Lottie to your Cartfile:

github "airbnb/lottie-ios" "master"

And then run:

carthage update

In your application targets “General” tab under the “Linked Frameworks and Libraries” section, drag and drop lottie-ios.framework from the Carthage/Build/iOS directory that carthage update produced.

Swift Package Manager

// swift-tools-version:5.1

import PackageDescription

let package = Package(
  name: "YourTestProject",
  platforms: [
       .iOS(.v12),
  ],
  dependencies: [
    .package(url: "https://github.com/airbnb/lottie-ios.git", from: "3.1.2")
  ],
  targets: [
    .target(name: "YourTestProject", dependencies: ["Lottie"])
  ]
)

And then import wherever needed: import Lottie

Adding it to an existent iOS Project via Swift Package Manager

  1. Using Xcode 11 go to File > Swift Packages > Add Package Dependency
  2. Paste the project URL: https://github.com/airbnb/lottie-ios
  3. Click on next and select the project target

If you have doubts, please, check the following links:

How to use

Creating Swift Packages

After successfully retrieved the package and added it to your project, just import Lottie and you can get the full benefits of it.

Project Statistics

Sourcerank 16
Repository Size 34.8 MB
Stars 18,550
Forks 2,617
Watchers 463
Open issues 95
Dependencies 2
Contributors 113
Tags 45
Created
Last updated
Last pushed

Top Contributors See all

Brandon Withrow Tyler Hedrick Antoine Cœur welshm StatusQuo Valeriy Van Vitalii Budnik David Thomas Hans Knöchel Iulian Onofrei Ferico Samuel Federico Nazrala Simon Mitchell Kyle Fox Fabian Kreiser Aleksandr Gusev Takeru Chuganji Leland Richardson bellchen Kyle Bashour

Packages Referencing this Repo

lottie-ios
Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations exporte...
Latest release 3.1.5 - Updated - 18.6K stars
airbnb/lottie-ios
An iOS library to natively render After Effects vector animations
Latest release 3.1.5 - Published - 18.6K stars
lottie-ios
A library to render native animations from bodymovin json. Now in Swift!
Latest release 3.1.3 - Updated - 18.6K stars
peerio-lottie-ios
Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations exporte...
Latest release 2.5.2 - Published - 18.6K stars

Recent Tags See all

3.1.5 November 04, 2019
3.1.4 October 25, 2019
3.1.3 September 13, 2019
3.1.2 July 17, 2019
3.1.1 July 01, 2019
3.1.1 July 01, 2019
3.1.0 May 29, 2019
3.1.0 May 29, 2019
3.0.7 May 29, 2019
3.0.7 May 29, 2019
3.0.6 May 14, 2019
3.0.6 May 14, 2019
3.0.5 April 11, 2019
3.0.5 April 11, 2019
3.0.4 April 09, 2019

Interesting Forks See all

CRAnimation/lottie-ios
An iOS library to natively render After Effects vector animations
Objective-C - Last pushed - 16 stars
peter-iakovlev/lottie-ios
An iOS library to natively render After Effects vector animations
Objective-C - Last pushed - 3 stars
MondeoWu/lottie-ios
An iOS library to natively render After Effects vector animations
Objective-C - Updated - 2 stars
CNXTEoE/lottie-ios
An iOS library to natively render After Effects vector animations
Objective-C - Updated - 2 stars
jegumhon/lottie-ios
extension of Lottie-iOS for getting some properties to customize LOTAnimationView
Objective-C - Apache-2.0 - Last pushed - 1 stars

Something wrong with this page? Make a suggestion

Last synced: 2019-11-04 22:53:26 UTC

Login to resync this repository