-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
Description
Reopening this issue: #2617
We managed to reproduce the issue with iPhone 16 Pro Max and iPhone 17 Pro Max on both device and simulator.
However, the issue did not occur on iPhone 15 Pro Max.
Crash message
Fatal Exception: CALayerInvalidGeometry
CALayer position contains NaN: [nan 89.8333]. Layer: <CALayer:0x1290123a0; position = CGPoint (inf 89.8333); bounds = CGRect (0 0; inf 179.667); delegate = <TtGC6Lottie27SwiftUIMeasurementContainerCS_19LottieAnimationView: 0x1293a8a00; frame = (nan 0; inf 179.667); autoresize = W+H; layer = <CALayer: 0x1290123a0>>; sublayers = (<CALayer: 0x129010780>); opaque = YES; allowsGroupOpacity = YES; >
We are using Lottie 4.5.2
Here's the code we used for the LottieView
VStack(spacing: .zero) {
LottieView(animation: .named(lottieFileName, bundle: .module))
.resizable()
.scaledToFill()
.frame(
width: Constants.lottieAnimationWidth,
height: Constants.lottieAnimationHeight
)
.padding(.horizontal, 16)
.padding(.bottom, 40)
Text(someText)
.foregroundStyle(Color.blue))
.multilineTextAlignment(.center)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.padding(.horizontal, 16)
.padding(.vertical, 16)
}
Reactions are currently unavailable