We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Context: I show different confetti in various places of my app. I like to use the Globals for easy use.
Problem: When I set the global SPConfettiConfiguration's color for the first time, it works:
SPConfettiConfiguration
SPConfettiConfiguration.particlesConfig.colors = [.red]
But when I reset it to some other color, the next confetti animation remains the color that was set in the first place. Here's an example:
func rainHearts() { SPConfettiConfiguration.particlesConfig.colors = [.red] SPConfettiConfiguration.particlesConfig.contentsScale = 0.60 SPConfetti.startAnimating(.fullWidthToDown, particles: [.custom(UIImage(systemName: "heart.fill")!)], duration: 3) } func rainConfetti() { SPConfettiConfiguration.particlesConfig.colors = [.yellow] SPConfettiConfiguration.particlesConfig.contentsScale = 0.5 SPConfetti.startAnimating(.fullWidthToDown, particles: [.triangle, .arc, .heart, .star, .custom(UIImage(named: "Trophy")!)], duration: 3) } self.rainHearts() /// this rains `red` hearts perfectly self.rainConfetti() /// this rains triangle, arc, heart, etc but in `red` color, when I expect it to be `yellow`
I even tried setting the SPConfettiConfiguration to it's default value: SPConfettiConfiguration.particlesConfig = .defaultValue
SPConfettiConfiguration.particlesConfig = .defaultValue
That did not work. Am I doing something wrong or is this a bug? Either way, any suggestions?
The text was updated successfully, but these errors were encountered:
ivanvorobei
No branches or pull requests
Context:
I show different confetti in various places of my app. I like to use the Globals for easy use.
Problem:
When I set the global
SPConfettiConfiguration
's color for the first time, it works:SPConfettiConfiguration.particlesConfig.colors = [.red]
But when I reset it to some other color, the next confetti animation remains the color that was set in the first place.
Here's an example:
I even tried setting the
SPConfettiConfiguration
to it's default value:SPConfettiConfiguration.particlesConfig = .defaultValue
That did not work.
Am I doing something wrong or is this a bug?
Either way, any suggestions?
The text was updated successfully, but these errors were encountered: