Giter Site home page Giter Site logo

ishan-chhabra / icconfetti Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 0.0 1014 KB

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

Home Page: https://ishanchhabra.com

License: MIT License

Ruby 11.35% Objective-C 4.74% Swift 83.91%
cocoapods swift pod ios confetti library uiview particles

icconfetti's Introduction

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.

icconfetti's People

Contributors

ishan-chhabra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

icconfetti's Issues

Deployment target too high: iOS 13 +

Real nice framework! It solved my issue perfectly
But, the deployment target is too high, I think you may downgrade it to iOS 11 - for the most compatibility.
And there is only stopRaining() method without startRaining

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.