项目作者: ishan-chhabra

项目描述 :
Adding delight with confetti. ICConfetti lets you rain confetti in your views. 🎉
高级语言: Swift
项目地址: git://github.com/ishan-chhabra/ICConfetti.git
创建时间: 2019-10-14T13:51:24Z
项目社区:https://github.com/ishan-chhabra/ICConfetti

开源协议:MIT License

下载



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. 🌧

  1. var icConfetti: ICConfetti!
  2. override func viewDidLoad() {
  3. super.viewDidLoad()
  4. icConfetti = ICConfetti()
  5. icConfetti.rain(in: self.view)
  6. }

Snippet # 2: Don’t forget to let the rain up! ☀️

  1. override func viewWillDisappear(_ animated: Bool) {
  2. super.viewWillDisappear(animated)
  3. icConfetti.stopRaining()
  4. }

Snippet # 3: Set up the visual aspect! 💄

  1. // Customize the colors... 🎨
  2. icConfetti.colors = [.red, .green, .yellow, .blue]
  3. // Tailor the confetti images. White template images work the best. 🖼
  4. icConfetti.images = [
  5. UIImage(named: "Box")!,
  6. UIImage(named: "Circle")!,
  7. UIImage(named: "Triangle")!,
  8. UIImage(named: "Spiral")!
  9. ]
  10. // Throttle the velocities... 🏎
  11. icConfetti.velocities = [100, 128, 144, 512]

Installation 🔧

CocoaPods

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

  1. pod 'ICConfetti'

Author 🙏🏻

Web: Ishan Chhabra\
Twitter: @chh_abracadabra\
Medium: @chh_abracadabra"">@chh_abracadabra

License 📜

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