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.
- I've provided a demo project to showcase few examples of Confetti's which can be made. Simply clone this repo, and open
- Here you can see and experiment custom Loaf styles in
- Device running on iOS/iPadOS 12.1+ versions 📱.
- Swift 5.4+ 💻
ConfettiKit is available through CocoaPods.
To install it, simply add the following line to your Podfile:
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 💪🏼
- Import Library 📚
- 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)
||Position from which confetti Starts
||Total types of confetti element
||Image to apply on every Cells
||Colour to apply on every Cells
||Size of cell
||Cells produced in a sec
||Total existence of a cell
||Speed of cell
||Rotation velocity of cell
||longitudinal orientation of the emission angle
||Angle(radians), defining a cone around the emission angle
||View on which Confetti is to be applied