Using Lottie 1.0.1 I've correctly implemented my animation view, that was able to stretch and scale perfectly in any device:
self.animationView = LOTAnimationView(contentsOf: jsonUrl)
self.view.addSubview(self.animationView!)
self.animationView?.constraintEdges(to: self.view) <--- constraintEdges is an our internal utility
now with Lottie 1.0.4 the constraints are ignored and the animationView get the size from the animation definition.
Solution:
self.animationView?.contentMode = UIViewContentMode.scaleAspectFill
Have a look to https://github.com/airbnb/lottie-ios/issues/108 a breaking change has been introduced, without following the semantic versioning rules
Most helpful comment
Solution:
self.animationView?.contentMode = UIViewContentMode.scaleAspectFillHave a look to https://github.com/airbnb/lottie-ios/issues/108 a breaking change has been introduced, without following the semantic versioning rules