forked from themeetgroup/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.
Add
TextProvider
support to Core Animation rendering engine (airbnb…
…#1723) Co-authored-by: Cal Stephens <[email protected]>
- Loading branch information
1 parent
f4b4b9d
commit f3d4073
Showing
30 changed files
with
91 additions
and
10 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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,27 @@ | ||
// Created by Igor Katselenbogen on 08/19/22. | ||
// Copyright © 2022 Airbnb Inc. All rights reserved. | ||
|
||
import Lottie | ||
|
||
// MARK: - HardcodedTextProvider | ||
|
||
/// An `AnimationTextProvider` that always returns a specific hardcoded text | ||
class HardcodedTextProvider: AnimationTextProvider { | ||
|
||
// MARK: Lifecycle | ||
|
||
init(text: String) { | ||
self.text = text | ||
} | ||
|
||
// MARK: Internal | ||
|
||
func textFor(keypathName _: String, sourceText _: String) -> String { | ||
text | ||
} | ||
|
||
// MARK: Private | ||
|
||
private let text: String | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
Tests/__Snapshots__/AutomaticEngineTests/testAutomaticEngineDetection.Issues-issue_1722.txt
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 @@ | ||
Supports Core Animation engine |
1 change: 1 addition & 0 deletions
1
...Snapshots__/AutomaticEngineTests/testAutomaticEngineDetection.Nonanimating-Text_Glyph.txt
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
Does not support Core Animation engine. Encountered compatibility issues: | ||
[TEXT] The Core Animation rendering engine does not support animating multiple keyframes for text layer text values (due to limitations of Core Animation `CAKeyframeAnimation`s). | ||
[TEXT] The Core Animation rendering engine does not support animating multiple keyframes for text layer text values (due to limitations of Core Animation `CAKeyframeAnimation`s). |
1 change: 1 addition & 0 deletions
1
...apshots__/AutomaticEngineTests/testAutomaticEngineDetection.Nonanimating-Text_NoGlyph.txt
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
Does not support Core Animation engine. Encountered compatibility issues: | ||
[TEXT] The Core Animation rendering engine does not support animating multiple keyframes for text layer text values (due to limitations of Core Animation `CAKeyframeAnimation`s). | ||
[TEXT] The Core Animation rendering engine does not support animating multiple keyframes for text layer text values (due to limitations of Core Animation `CAKeyframeAnimation`s). |
Binary file added
BIN
+31.3 KB
...pshots__/SnapshotTests/testCoreAnimationRenderingEngine.Issues-issue_1722-0.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
BIN
+17.3 KB
...hots__/SnapshotTests/testCoreAnimationRenderingEngine.Issues-issue_1722-100.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
BIN
+28.5 KB
...shots__/SnapshotTests/testCoreAnimationRenderingEngine.Issues-issue_1722-25.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
BIN
+33.8 KB
...shots__/SnapshotTests/testCoreAnimationRenderingEngine.Issues-issue_1722-50.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
BIN
+28.5 KB
...shots__/SnapshotTests/testCoreAnimationRenderingEngine.Issues-issue_1722-75.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 modified
BIN
+24 Bytes
(100%)
...apshots__/SnapshotTests/testCoreAnimationRenderingEngine.Issues-issue_885-0.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 modified
BIN
+28 Bytes
(100%)
...shots__/SnapshotTests/testCoreAnimationRenderingEngine.Issues-issue_885-100.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 modified
BIN
+3 Bytes
(100%)
...pshots__/SnapshotTests/testCoreAnimationRenderingEngine.Issues-issue_885-25.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 modified
BIN
+23 Bytes
(100%)
...pshots__/SnapshotTests/testCoreAnimationRenderingEngine.Issues-issue_885-50.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 modified
BIN
+12 Bytes
(100%)
...pshots__/SnapshotTests/testCoreAnimationRenderingEngine.Issues-issue_885-75.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 modified
BIN
+20 Bytes
(100%)
...pshots__/SnapshotTests/testCoreAnimationRenderingEngine.Issues-pr_1604_2-50.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
BIN
+31.3 KB
...Snapshots__/SnapshotTests/testMainThreadRenderingEngine.Issues-issue_1722-0.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
BIN
+17.3 KB
...apshots__/SnapshotTests/testMainThreadRenderingEngine.Issues-issue_1722-100.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
BIN
+28.5 KB
...napshots__/SnapshotTests/testMainThreadRenderingEngine.Issues-issue_1722-25.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
BIN
+33.8 KB
...napshots__/SnapshotTests/testMainThreadRenderingEngine.Issues-issue_1722-50.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
BIN
+28.5 KB
...napshots__/SnapshotTests/testMainThreadRenderingEngine.Issues-issue_1722-75.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.