lottie-ios
lottie-ios copied to clipboard
Animation playing bug in iOS SDK
Hello. When I play the json animation file with Lottie iOS SDK, it has bugs with borders: the character's body outline(border) does not move in sync with the body. If I play animation in the web version with Lottie JSON Editor - everything looks fine. Seems like iOS SDK renders the animation differently. I attach the animation file. Is it the SDK bug or can my designer change something in the json?
Also I attach the screenshot with border problem. Thank you!
Attachments: https://fex.net/s/lcrcrtd
you can preview your json use LottieFiles App in appstore. maybe you can set frame to your animationview or contentMode. your json work is good in my code.
@maiyabj I did it, I tested it with Lottie app from App Store and it plays it wrong again and again On iOS side(Lottie App Store app or testing with SDK by myself) the border of the hood does not move synchronously with the character's head, but it moves synchronously if we play the animation on the website json editor.
@maiyabj is the problem in iOS SDK?
in my simulator is ok this is my code:
let loadingImageView = AnimationView().then {
$0.animation = Animation.filepath(R.file.animationFileIOSSDKPlaysItWrong1Json.path()!)
$0.loopMode = .loop
$0.contentMode = .scaleAspectFit
$0.backgroundBehavior = .pauseAndRestore
}
view.addSubview(loadingImageView)
loadingImageView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.top.equalToSuperview().offset(200)
}
@maiyabj is the problem in iOS SDK?
https://user-images.githubusercontent.com/13246625/145006756-713403da-4e99-4ca2-917a-7d841b177aac.mp4
you can set const to width or height
loadingImageView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.top.equalToSuperview().offset(200)
make.width.equalTo(100)
make.height.equalTo(160)
}
https://user-images.githubusercontent.com/13246625/145006929-36caefa3-8b94-417b-af2a-ea6ee6a10d56.mp4
@maiyab
Please, look at the border... It must not look like this.
If you will play this json on Lottie json editor on website - you'll see the difference behind border behaviour.
j
@maiyaB Please, look at the border... It must not look like this. If you will play this json on Lottie json editor on website - you'll see the difference behind border behaviour.
j
please show me your code
@maiyabj I tried your code that you provided, result is the same
@palyvoda, could you share a copy of your animation json? The link you originally shared no longer works
This issue is stale because it is marked "can't reproduce" and has had no activity in the past week. Please comment with additional information, or this issue will be closed due to inactivity in one week.
I have the same issue