Skip to content

Commit

Permalink
Initial commit of lottie-swift
Browse files Browse the repository at this point in the history
  • Loading branch information
buba447 committed Mar 6, 2019
1 parent 65402f3 commit a607fc1
Show file tree
Hide file tree
Showing 567 changed files with 19,008 additions and 21,758 deletions.
353 changes: 353 additions & 0 deletions Documentation/CONTRIBUTOR.md

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions Documentation/MIGRATING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Migrating from Lottie 2.5.2(OBJC) -> 3.0 (SWIFT)

Lottie 3.0 is a complete rewrite of Lottie in swift. Because of this there are some minor API changes. This guide should help you through migrating code from Lottie 2.5.2 to 3.0

Swift discourages the use of Prefix for names. A lot of the api changes are just the removal of `LOT` from the class name. Below is a complete list of API changes.

To use Lottie Swift in an Objective-C project read Apple's offical documentation [here](https://developer.apple.com/documentation/swift/imported_c_and_objective-c_apis/importing_swift_into_objective-c)

## Class Changes
| Lottie 2.5.2 | Lottie 3.0+ |
| --:| --:|
|`LOTAnimationView`|`AnimationView`|
|`LOTComposition`|`Animation`|
|`LOTKeypath`|`AnimationKeypath`|
|`LOTAnimationCache`|`AnimationCacheProvider`|
|`LOTCacheProvider`|`AnimationImageProvider`|
|`LOTValueDelegate`|`AnyValueProvider`|
|`LOTAnimatedControl`|`AnimatedControl`|
|⛔️|`AnimatedButton`|
|`LOTAnimatedSwitch`|`AnimatedSwitch`|

## Method Changes

| Lottie 2.5.2 | Lottie 3.0+ |
| --:| --:|
|`LOTAnimationView.sceneModel`|`AnimationView.animation`|
|`LOTAnimationView.loopAnimation`|`AnimationView.loopMode`|
|`LOTAnimationView.autoReverseAnimation`|`AnimationView.loopMode`|
|`LOTAnimationView.animationProgress`|`AnimationView.currentProgress`|
|`LOTAnimationView.cacheEnable`|⛔️(Cache is passed in on init)|
|`LOTAnimationView.setValueDelegate:forKeypath:`|`AnimationView.setValueProvider:keypath:`|
|`LOTComposition.animationNamed:`|`Animation.named:`|
|`LOTComposition.animationWithFilePath:`|`Animation.filepath:`|
|`LOTComposition.animationNamed:inBundle:`|`Animation.named:bundle:`|
|`LOTComposition.animationFromJSON:`|⛔️(`Animation` is Encodable/Decodable from data on it's own.)|
<!--stackedit_data:
eyJoaXN0b3J5IjpbLTE1NDEwODc0Ml19
-->
Binary file added Documentation/images/animatorNode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation/images/nodeProperty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation/images/nodePropertyMap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation/images/nodeUpdate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation/images/outputNode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation/images/propertyUpdate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation/images/renderMap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation/images/valueContainer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation/images/valueProvider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
754 changes: 0 additions & 754 deletions Example-Swift/Lottie-Example-Swift.xcodeproj/project.pbxproj

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion Example-Swift/Lottie-Example-Swift/Boat_Loader.json

This file was deleted.

90 changes: 0 additions & 90 deletions Example-Swift/Lottie-Example-Swift/ViewController.swift

This file was deleted.

This file was deleted.

This file was deleted.

21 changes: 0 additions & 21 deletions Example-Swift/Podfile

This file was deleted.

16 changes: 0 additions & 16 deletions Example-Swift/Podfile.lock

This file was deleted.

46 changes: 0 additions & 46 deletions Example-Swift/Pods/Local Podspecs/lottie-ios.podspec.json

This file was deleted.

16 changes: 0 additions & 16 deletions Example-Swift/Pods/Manifest.lock

This file was deleted.

Loading

0 comments on commit a607fc1

Please sign in to comment.