github airbnb/lottie-ios 4.3.2

latest releases: 4.5.0, 4.4.3, 4.4.2...
13 months ago

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

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.2

Lottie 4.3.2 redesigns the LottiePlaybackMode playback APIs that were introduced in Lottie 4.3.0.

Before

// Loop from 0.5 to 1.0
LottieView(animation: myAnimation)
  .play(.fromProgress(0.5, toProgress: 1.0, loopMode: .loop))

// Pause at the halfway point of the animation
LottieView(animation: myAnimation)
  .play(.progress(0.5))

After

// Loop from 0.5 to 1.0
LottieView(animation: myAnimation)
  .playing(.fromProgress(0.5, toProgress: 1.0, loopMode: .loop))

// Pause at the halfway point of the animation
LottieView(animation: myAnimation)
  .paused(at: .progress(0.5))

New Features in Lottie 4.3.0

  • Add SwiftUI LottieView, which wraps UIKit LottieAnimationView
  • Add SwiftUI LottieSwitch, which wraps UIKit AnimatedSwitch (#2138)
  • Add SwiftUI LottieButton, which wraps AnimatedButton (#2139)
  • AnimatedSwitch and AnimatedButton now support macOS (#2138, #2139)
  • Add LottieAnimationLayer, a Core Animation CALayer subclass for playing Lottie animations (#2073)
  • Add support for rendering drop shadow layer effects (#2142)
  • Add API for playing multiple markers sequentially (#2084)
  • Play "reduced motion" marker if UIAccessibility.isReduceMotionEnabled is true (#2110)
  • Update text provider API to use full AnimationKeypath values (#2183)
  • Add support for visionOS (#2152)
  • Drop support for Swift 5.5 (#2152)
  • Add contents gravity configuration to AnimationImageProvider (#2177)
  • Add support for customizing stroke width values using FloatValueProvider (#2179)
  • Adopt Sendable to support using Lottie with strict concurrency enabled (#2126)
  • Add LottiePlaybackMode to support declarative playback configuration (#2128)
  • Add option make main thread rendering engine force display update on every frame (#2168)
  • Add a option to prevent caching images from AnimationImageProvider (#2171)
  • Add support for customizing gradient values using GradientValueProvider (#2182)
  • Added additional support for multiple animations in DotLottieFile (#2074)
  • Add helper method to initialize DotLottieFile with data (#2090)

Bug fixes

  • Remove .../ZipFoundation/README.md from targets and *.md* files from podspec (#2057)*
  • Fix issue where layers with negative X scale values could be pixelated (#2067)
  • Fix warnings when building with Swift 5.9 (#2072)
  • Restructure ValueProviderStore to not accumulate multiple values for the same key (#2082)
  • Disable bitcode when building XCFramework (#2121)
  • Fix unhandled file warning when building with SPM (https://github.com/airbnb/lottie-ios/pull/213)
  • Fix support for customizing color of SolidLayer using ColorValueProvider (#2154)
  • Fix issue where shape items could be unexpectedly ignored (#2156)
  • Fix issue where skew keyframes would unexpectedly not animate (#2157)
  • Fix issue where value providers could be ignored when falling back to main thread rendering engine (#2164)

Thanks to everyone who contributed to this release!

Don't miss a new lottie-ios release

NewReleases is sending notifications on new releases.