Lottie-ios: how to switch animation?

Created on 30 Jun 2017  路  5Comments  路  Source: airbnb/lottie-ios

I show animation in UICollectionViewCell, Every animation is different, In order to avoid cell's recycling, I need to load animation again when the cell every time load. So I try to destroy Lottie and recreate, But It cause interface caton very much when rolling. So what should I do?

duplicate enhancement

All 5 comments

I think you should not destroy&recreate LottieView, cache lottieView and pause&play when your cell hidden&show

Thanks, I will try it.

We are working to add support for setting animation after initializing a LOTAnimationView

Closing as we are tracking the issue here https://github.com/airbnb/lottie-ios/issues/344

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CentrumGuy picture CentrumGuy  路  4Comments

zhangjunmax picture zhangjunmax  路  3Comments

muraterd picture muraterd  路  5Comments

ricardohochman picture ricardohochman  路  4Comments

rajeshbeats picture rajeshbeats  路  3Comments