From fef4663dcf71a9f7894593ada1875579880c457a Mon Sep 17 00:00:00 2001 From: Badarinath Venkatnarayansetty Date: Wed, 3 Mar 2021 13:22:12 -0800 Subject: [PATCH] Fix for not showing confetti for the first time --- CardParts.podspec | 2 +- CardParts/src/Classes/Card Parts/CardPartConfettiView.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CardParts.podspec b/CardParts.podspec index d6cf8d4..dd77981 100644 --- a/CardParts.podspec +++ b/CardParts.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'CardParts' - s.version = '3.3.0' + s.version = '3.4.0' s.platform = :ios s.summary = 'iOS Card UI framework.' diff --git a/CardParts/src/Classes/Card Parts/CardPartConfettiView.swift b/CardParts/src/Classes/Card Parts/CardPartConfettiView.swift index b8553cb..f4257ee 100644 --- a/CardParts/src/Classes/Card Parts/CardPartConfettiView.swift +++ b/CardParts/src/Classes/Card Parts/CardPartConfettiView.swift @@ -55,12 +55,12 @@ public class CardPartConfettiView: UIView, CardPartView { emitter.emitterPosition = CGPoint(x: frame.size.width / 2.0, y: 0) emitter.emitterShape = shape emitter.emitterSize = CGSize(width: frame.size.width, height: 1) - emitter.beginTime = CACurrentMediaTime() //construct the cells var cells = [CAEmitterCell]() for (index,color) in colors.enumerated() { let colorConfetti = confetti(with: color, for: index) + colorConfetti.beginTime = CACurrentMediaTime() cells.append(colorConfetti) }