Lottie-ios: Animation scaling

Created on 20 Feb 2017  路  1Comment  路  Source: airbnb/lottie-ios

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.

Most helpful comment

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

>All comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

petoye picture petoye  路  3Comments

WZBbiao picture WZBbiao  路  5Comments

chrisballinger picture chrisballinger  路  4Comments

amannayak0007 picture amannayak0007  路  3Comments

CentrumGuy picture CentrumGuy  路  4Comments