Skip to content

SwiftConfettiView 2.0.0

Latest

Choose a tag to compare

@ugurethemaydin ugurethemaydin released this 09 Feb 16:09
· 18 commits to master since this release

What's New

Features

  • SwiftUI Support - Full ConfettiView wrapper with UIViewRepresentable
  • Presets - Ready-to-use templates: .perfect, .firework, .rain
  • Burst Mode - One-shot confetti with burstCount
  • Density Control - Adjust particle count with density
  • Sound Effects - Built-in celebratory sound with playSound and custom sound support
  • Haptic Feedback - UIImpactFeedbackGenerator on start
  • Depth Effect - Dual-layer parallax with addDepth
  • Fade Out - Smooth stop animation with CATransition
  • SF Symbol Type - .sfSymbol("star.fill") confetti
  • Text Type - .text("🎉") emoji confetti
  • Emission Control - emitterOrigin, emissionAngle, spread
  • Callback - onStop closure when confetti finishes
  • SPM Support - Swift Package Manager installation
  • Touch Passthrough - isUserInteractionEnabled = false by default

Improvements

  • CAEmitterLayer beginTime synchronization (no particle flood)
  • Per-cell naming for keypath animations
  • Gravity ramp with CAKeyframeAnimation
  • Initial burst animation (3x to 1x birthRate)

Migration

  • Enum cases renamed to lowercase (.confetti, .triangle, .star, .diamond)
  • isActive() method replaced with isActive property
  • Xcode Fix-it shims provided for renamed APIs
  • See Migration Guide for details

Requirements

  • iOS 13.0+
  • Swift 5.0+