forked from airbnb/lottie-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
567 changed files
with
19,008 additions
and
21,758 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
--> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
754
Example-Swift/Lottie-Example-Swift.xcodeproj/project.pbxproj
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
Example-Swift/Lottie-Example-Swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
...Swift.xcodeproj/xcuserdata/brandon_withrow.xcuserdatad/xcschemes/xcschememanagement.plist
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
Example-Swift/Lottie-Example-Swift.xcworkspace/contents.xcworkspacedata
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
...t.xcworkspace/xcuserdata/brandon_withrow.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
Example-Swift/Lottie-Example-Swift/Base.lproj/LaunchScreen.storyboard
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
Example-Swift/Lottie-Example-SwiftTests/Lottie_Example_SwiftTests.swift
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
Example-Swift/Lottie-Example-SwiftUITests/Lottie_Example_SwiftUITests.swift
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.