I don't have a reproduction project right now, but I'm having trouble using Lottie in Xamarin.iOS. I added an animation to the BackgroundView of a UICollectionView when the collection is empty (e.g. no result found view). When the collection receives items, then I pause and dispose the animation, remove it from its superview, and null out the BackgroundView. The problem is scrolling becomes jittery when I scroll up and down. This only happens if I have called Play() on the animation. To me, it looks like there is a memory leak somewhere.
var lotAnimationView = LOTAnimationView.AnimationNamed("animation");
lotAnimationView.LoopAnimation = true;
lotAnimationView.TranslatesAutoresizingMaskIntoConstraints = false;
uiStackView.AddArrangedSubview(lotAnimationView);
lotAnimationView.WidthAnchor.ConstraintEqualTo(150).Active = true;
lotAnimationView.HeightAnchor.ConstraintEqualTo(150).Active = true;
lotAnimationView.Play(); // causes jittery scrolling when `BackgroundView` is disposed
Expected behavior
LOTAnimationView needs to be disposed properly so that UICollectionView performance is not affected negatively.
š Bug Report
I don't have a reproduction project right now, but I'm having trouble using Lottie in Xamarin.iOS. I added an animation to the
BackgroundView
of aUICollectionView
when the collection is empty (e.g. no result found view). When the collection receives items, then I pause and dispose the animation, remove it from its superview, and null out theBackgroundView
. The problem is scrolling becomes jittery when I scroll up and down. This only happens if I have calledPlay()
on the animation. To me, it looks like there is a memory leak somewhere.Expected behavior
LOTAnimationView
needs to be disposed properly so thatUICollectionView
performance is not affected negatively.Platform: