Created
December 17, 2020 19:26
-
-
Save giovani-pereira-ifood/8aac0376ea01d01c4568599eb7d054a4 to your computer and use it in GitHub Desktop.
load Lottie animation from JSON
This file contains hidden or 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
guard let jsonString = UserDefaults.shared.string(forKey: .splashAnimation), | |
let data = jsonString.data(using: .utf8), | |
let animation = try? JSONDecoder().decode(Animation.self, from: data) else { return } | |
animationView = AnimationView(animation: animation) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment