Comments (5)
Can you share a sample project that demonstrates this issue?
from lottie-ios.
@calda https://github.com/via-guy/LottieDemo
from lottie-ios.
There seems to be an issue when you have a container view for it.
let animationView = LottieAnimationView(name: "loader")
containerView.addSubview(animationView)
animationView.translatesAutoresizingMaskIntoConstraints = false
containerView.addConstraints(NSLayoutConstraint.constraints(
withVisualFormat: "V:|-(0)-[contentView]-(0)-|",
options: NSLayoutConstraint.FormatOptions.alignAllLastBaseline,
metrics: nil,
views: ["contentView": animationView]
))
containerView.addConstraints(NSLayoutConstraint.constraints(
withVisualFormat: "H:|-(0)-[contentView]-(0)-|",
options: NSLayoutConstraint.FormatOptions.alignAllLastBaseline,
metrics: nil,
views: ["contentView": animationView]
))
animationView.backgroundBehavior = .pauseAndRestore
animationView.viewportFrame = animationView.bounds
animationView.loopMode = .loop
animationView.play()
from lottie-ios.
This appears to be because you're setting animationView.viewportFrame = animationView.bounds
.
I don't think that line is necessary -- if I remove it, your demo runs correctly.
However, this infinite loop happens any time viewportFrame
is non-nil, so is definitely a regression we should fix.
from lottie-ios.
Here's a fix: #2316
from lottie-ios.
Related Issues (20)
- reuse LottieView and prevent .configure from being called again HOT 2
- no rule to process file 'PrivacyInfo.xcprivacy' of type 'text.xml' with CocoaPods HOT 8
- I am seeing 'Command PhaseScriptExecution failed HOT 2
- Modifying state during view update, this will cause undefined behavior.
- `PrivacyInfo.xcprivacy` is not included in `lottie-spm` repo HOT 4
- Warning in Xcode when using Lottie 4.4.0 with cocoa pods HOT 1
- Completion Closure Not Called in CA Mode Like in Main Thread Mode HOT 1
- LottieView.animationDidFinish not called correctly when background behavior is set to continue playing
- Lottie missing elements in Animation HOT 3
- SPM fails to compile when lottie-spm is added via SPM Package.swift file HOT 1
- module map 'xxx/lottie-ios/Lottie.modulemap' not found HOT 2
- can't clone Lottie iOS on cocoa pods HOT 2
- lottie-spm fails builds in GitHub Actions
- Lottie animation freezes whole app on 4.4.0/4.4.1 (works fine on 4.3.1) HOT 1
- Lottie animation freezes whole app on 4.4.0/4.4.1 (works fine on 4.3.1) HOT 5
- Password with a space is being used while joining the network using airbnb app
- Troubleshooting Lottie Integration Errors in GitHub Actions CI/CD Pipeline HOT 2
- The signature of “Lottie.xcframework” cannot be validated and may have been compromised. HOT 4
- SPM: skipping cache due to an error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lottie-ios.