Giter Site home page Giter Site logo

confettikit's Introduction

ConfettiKit

ConfettiKit🎉

CI Status Version Badges Platform Relative date Maintenance commit contributors Badge badge Badge Watchers

About 📒

ConfettiKit is a custom framework used to add Confetti on your iOS/iPadOS projects. The kit provides variety of customisations inorder to design a confetti which matches your project's UI. ConfettiKit makes your work of adding Confetti on your project with just one line of code.

Playground 💻

  • I've provided a demo project to showcase few examples of Confetti's which can be made. Simply clone this repo, and open ConfettiKit.xcworkspace.
  • Run pod install.
  • Here you can see and experiment custom Loaf styles in Examples.swift.

Requirements ❕

  • Device running on iOS/iPadOS 12.1+ versions 📱.
  • Swift 5.4+ 💻

Installation 🌏

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

pod 'ConfettiKit'

No CocoaPods❗️

I have a solution 👀
  • Add this Confetti.swift file into your project.
  • Now you are ready to use ConfettiKit 🚀.
  • Remaining steps are same 😁.
  • Do read the documentation till the end to know more about ConfettiKit 💪🏼

Usage ⚙️

  1. Import Library 📚
import ConfettiKit
  1. Generate Confetti 🎉
  • Write this one line of code and add the parameters according to your specifications.
Confetti.generateConfetti(ConfettiPosition:Position, ConfettiCells:Int, ConfettiImage:[String], Colours:[UIColor], Scale:CGFloat ,BirthRate: Float, LifeTime:Float, Velocity:CGFloat, Spin:CGFloat, EmissionLongitude:CGFloat = CGFloat(Double.pi), EmissionRange:CGFloat, View: UIView)

Parameters 🎛

Parameter Definition
ConfettiPosition Position from which confetti Starts
ConfettiCells Total types of confetti element
ConfettiImage Image to apply on every Cells
Colours Colour to apply on every Cells
Scale Size of cell
BirthRate Cells produced in a sec
Parameter Definition
LifeTime Total existence of a cell
Velocity Speed of cell
Spin Rotation velocity of cell
EmissionLongitude longitudinal orientation of the emission angle
EmissionRange Angle(radians), defining a cone around the emission angle
View View on which Confetti is to be applied

Result 💯

Customization 1 Customization 2 Customization 3

How to Stop Confetti ? ❌

  • To stop confetti just write this one line of code
Confetti.stopConfetti()

Instructions 🚩

  1. Images which are to be used in Confetti must be present in the Images.xcassets file.
  2. Change Rendering property of every Confetti Image to Template Image from Attribute Inspector.

  1. While providing ConfettiImage & Colours do remember total number of Images and colours must be same to the number of ConfettiCells.

How to Contribute 🖋

  • Run the app - Steps are mentioned above.
  • If you face issues in any step open a new issue.
  • To fix issues: Fork this repository, make your changes and make a Pull Request.

License

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

Like the Project ?

If you like using any of my projects or like what I'm doing, please do consider backing me with appreciating my work: Message me🥰

BMC logo+wordmark - Black

OR

Drop a star ⭐ if you find this project interesting!

Made with ❤️ in 🇮🇳 By Gokul Nair

confettikit's People

Contributors

gokulnair2001 avatar

Watchers

James Cloos avatar

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.