Skip to content

Commit

Permalink
Merge pull request #270 from intuit/task/fix_confetti_not_showing_fir…
Browse files Browse the repository at this point in the history
…st_time

Fix for not showing confetti for the first time
  • Loading branch information
badrinathvm authored Mar 3, 2021
2 parents 586de72 + fef4663 commit 27126a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CardParts.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 27126a7

Please sign in to comment.