Skip to content

Adding delight with confetti. ICConfetti lets you rain confetti in your views. πŸŽ‰

License

Notifications You must be signed in to change notification settings

ishan-chhabra/ICConfetti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Logo
Logo

It's raining confetti. πŸŽ‰

crafted with β™₯ by Ishan Chhabra

swift 5.0 pod 0.0.1 license MIT platform IOS

author Ishan Chhabra

Description πŸ—£

Adding delight with confetti. ICConfetti lets you rain confetti in your views. πŸŽ‰

Preview πŸ“Ί

Logo

Code πŸ‘¨β€πŸ’»

Snippet # 1: It's raining confetti in two lines of code. 🌧

var icConfetti: ICConfetti!

override func viewDidLoad() {
  super.viewDidLoad()
  icConfetti = ICConfetti()
  icConfetti.rain(in: self.view)
}

Snippet # 2: Don't forget to let the rain up! β˜€οΈ

override func viewWillDisappear(_ animated: Bool) {
  super.viewWillDisappear(animated)
  icConfetti.stopRaining()
}

Snippet # 3: Set up the visual aspect! πŸ’„

// Customize the colors... 🎨
icConfetti.colors = [.red, .green, .yellow, .blue]

// Tailor the confetti images. White template images work the best. πŸ–Ό
icConfetti.images = [
  UIImage(named: "Box")!,
  UIImage(named: "Circle")!,
  UIImage(named: "Triangle")!,
  UIImage(named: "Spiral")!
]

// Throttle the velocities... 🏎
icConfetti.velocities = [100, 128, 144, 512]

Installation πŸ”§

CocoaPods

ICConfetti is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ICConfetti'

Author πŸ™πŸ»

Web: Ishan Chhabra
Twitter: @chh_abracadabra
Medium: @chh_abracadabra

License πŸ“œ

ICConfetti is available under the MIT license. See the LICENSE file for more info.

About

Adding delight with confetti. ICConfetti lets you rain confetti in your views. πŸŽ‰

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published