0

I have an UIView with several other UIViews as subviews. Each one of these subviews can be clicked, and when they are they will animate their layer and "pop" out which makes it look like it's selected. But in each subview I also have a Lottie animation.

When I select one of these subview UIViews the Lottie Animation is not tagging along, it simply pops into the right position after my select animation is finished. It's almost as if the layer of my Lottie animation is not in my UIViews layer hierarchy. But if I don't play my lottie animation and simply pause it, it works fine. This is how I create my lottie animation object, from a json created in After Effects:

 - (CALayer *)fetchAnimationForIcon:(NSString *)iconName {
    LOTAnimationView *a = [LOTAnimationView animationNamed:iconName];
    [a play];

    return a.layer;
}

I then add this layer as a sublayer to the UIView calling this method. I then proceed to animate the select animation on this UIView, which causes a.layer to pop or blink into correct position. It simply isn't animating while running. But if I don't play the animation it all works fine.

ClockWise
  • 1,509
  • 15
  • 32
  • 1
    did you find any solution of this ? I trying the same to add lottie in video and having same issue. – M Zubair Shamshad Jun 11 '18 at 07:02
  • 1
    If I remember correctly there was an issue with the way our app handles layers and the way lottie does it. I was adding the animation to the layer which didn't really work that well when using lottie for some reason. I don't remember how we fixed it though, sorry :( – ClockWise Jun 12 '18 at 08:03
  • any gist you can remember? – Sk Borhan Uddin Sep 06 '19 at 10:36
  • @SkBorhanUddin sorry no, I wasn't the one who fixed it and it was so long ago. I don't even work on that project anymore, sorry :/ – ClockWise Sep 06 '19 at 11:49

0 Answers0