Theming
For creating themes inside your .lottie
check out this blog.
Usage
public func setTheme(_ themeId: String) -> Bool
public func setThemeData(_ themeData: String) -> Bool
public func setSlots(_ slots: String) -> Bool
public func resetTheme() -> Bool
public func activeThemeId() -> String
Loading themes:
let anim = DotLottieAnimation(fileName: "themed.lottie", config: AnimationConfig(..., themeId: "myTheme"))
Or via setTheme
:
let anim = DotLottieAnimation(fileName: "themed.lottie", config: AnimationConfig(...))
anim.setTheme(themeId: "dark-mode")
Removing themes:
let anim = DotLottieAnimation(fileName: "themed.lottie", config: AnimationConfig(...))
anim.resetTheme()