4.3.1
Lottie 4.3.0 adds many new features, including:
- Official support for SwiftUI!
- A public Core Animation
CALayer
subclass - Support for reduced motion
- Support for drop shadow layer effects
- Support for visionOS in the lottie-ios repo
You can learn more about Lottie 4.3.0 in this announcement: Lottie 4.3.0 now available, with official support for SwiftUI #2189
Lottie 4.3.1 fixes a small regression introduced by 4.3.0: airbnb/lottie-ios#2193
New Features
- Add SwiftUI
LottieView
, which wraps UIKitLottieAnimationView
- Add SwiftUI
LottieSwitch
, which wraps UIKitAnimatedSwitch
(airbnb/lottie-ios#2138) - Add SwiftUI
LottieButton
, which wrapsAnimatedButton
(airbnb/lottie-ios#2139) AnimatedSwitch
andAnimatedButton
now support macOS (airbnb/lottie-ios#2138, airbnb/lottie-ios#2139)- Add
LottieAnimationLayer
, a Core AnimationCALayer
subclass for playing Lottie animations (airbnb/lottie-ios#2073) - Add support for rendering drop shadow layer effects (airbnb/lottie-ios#2142)
- Add API for playing multiple markers sequentially (airbnb/lottie-ios#2084)
- Play "reduced motion" marker if
UIAccessibility.isReduceMotionEnabled
is true (airbnb/lottie-ios#2110) - Update text provider API to use full
AnimationKeypath
values (airbnb/lottie-ios#2183) - Add support for visionOS (airbnb/lottie-ios#2152)
- Drop support for Swift 5.5 (airbnb/lottie-ios#2152)
- Add contents gravity configuration to
AnimationImageProvider
(airbnb/lottie-ios#2177) - Add support for customizing stroke width values using
FloatValueProvider
(airbnb/lottie-ios#2179) - Adopt
Sendable
to support using Lottie with strict concurrency enabled (airbnb/lottie-ios#2126) - Add
LottiePlaybackMode
to support declarative playback configuration (airbnb/lottie-ios#2128) - Add option make main thread rendering engine force display update on every frame (airbnb/lottie-ios#2168)
- Add a option to prevent caching images from
AnimationImageProvider
(airbnb/lottie-ios#2171) - Add support for customizing gradient values using
GradientValueProvider
(airbnb/lottie-ios#2182) - Added additional support for multiple animations in
DotLottieFile
(airbnb/lottie-ios#2074) - Add helper method to initialize
DotLottieFile
with data (airbnb/lottie-ios#2090)
Bug fixes
- Remove
.../ZipFoundation/README.md
from targets and*.md*
files from podspec (airbnb/lottie-ios#2057)* - Fix issue where layers with negative X scale values could be pixelated (airbnb/lottie-ios#2067)
- Fix warnings when building with Swift 5.9 (airbnb/lottie-ios#2072)
- Restructure
ValueProviderStore
to not accumulate multiple values for the same key (airbnb/lottie-ios#2082) - Disable bitcode when building XCFramework (airbnb/lottie-ios#2121)
- Fix unhandled file warning when building with SPM (https://github.com/airbnb/lottie-ios/pull/213)
- Fix support for customizing color of
SolidLayer
usingColorValueProvider
(airbnb/lottie-ios#2154) - Fix issue where shape items could be unexpectedly ignored (airbnb/lottie-ios#2156)
- Fix issue where skew keyframes would unexpectedly not animate (airbnb/lottie-ios#2157)
- Fix issue where value providers could be ignored when falling back to main thread rendering engine (airbnb/lottie-ios#2164)
Thanks to everyone who contributed to this release!