Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gokulnair2001/ConfettiKit
A custom framework to add Confetti๐ on iOS/iPadOS projects.
https://github.com/gokulnair2001/ConfettiKit
confetti confetti-animation confetti-ball confetti-view popper ui-components
Last synced: 3 months ago
JSON representation
A custom framework to add Confetti๐ on iOS/iPadOS projects.
- Host: GitHub
- URL: https://github.com/gokulnair2001/ConfettiKit
- Owner: gokulnair2001
- License: mit
- Created: 2021-07-12T08:38:01.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-09T04:30:18.000Z (over 2 years ago)
- Last Synced: 2024-07-15T02:21:25.577Z (4 months ago)
- Topics: confetti, confetti-animation, confetti-ball, confetti-view, popper, ui-components
- Language: Swift
- Homepage:
- Size: 270 KB
- Stars: 20
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - ConfettiKit - A custom framework to add Confetti on iOS/iPadOS projects. [โข](https://user-images.githubusercontent.com/56252259/126186797-01dd53e1-8861-4f4d-a44d-69b8f0bbfc1e.gif) (Content / Effects)
README
![ConfettiKit](https://user-images.githubusercontent.com/56252259/125235649-69d4f000-e300-11eb-903c-43b07d7b7f9e.png)
# ConfettiKit๐
[![CI Status](https://img.shields.io/travis/gokulnair2001/ConfettiKit.svg?style=flat)](https://travis-ci.org/gokulnair2001/ConfettiKit)
[![Version](https://img.shields.io/cocoapods/v/ConfettiKit.svg?style=flat)](https://cocoapods.org/pods/ConfettiKit)
![Badges](https://img.shields.io/badge/License-MIT-yellow)
[![Platform](https://img.shields.io/cocoapods/p/ConfettiKit.svg?style=flat)](https://cocoapods.org/pods/ConfettiKit)
[![Relative date](https://img.shields.io/date/1577392258?color=important&label=started&logo=github)](https://github.com/gokulnair2001/ConfettiKit)
[![Maintenance](https://img.shields.io/maintenance/yes/2021?color=green&logo=github)](https://github.com/gokulnair2001/ConfettiKit)
![commit](https://img.shields.io/github/commits-since/gokulnair2001/ConfettiKit/1.0.0/master)
![contributors](https://img.shields.io/github/contributors/gokulnair2001/ConfettiKit)
![Badge](https://img.shields.io/badge/Xcode-12.0-green)
![badge](https://img.shields.io/badge/Swift-5.0-red)
![Badge](https://img.shields.io/badge/LibSize-3kb-brown)
![Watchers](https://img.shields.io/github/watchers/gokulnair2001/ConfettiKit?label=Watch)## 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](https://cocoapods.org).
To install it, simply add the following line to your Podfile:```ruby
pod 'ConfettiKit'
```
## No CocoaPodsโ๏ธ* Add this [Confetti.swift file](https://github.com/gokulnair2001/ConfettiKit/tree/master/Sources) 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 ๐
```swift
import ConfettiKit
```
2. Generate Confetti ๐
* Write this one line of code and add the parameters according to your specifications.```swift
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 |
| 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 |
|-- | -- | -- |
| |* Above given confettis are example project, you can cutomise it with your favourite confetti style.
## How to Stop Confetti ? โ
* To stop confetti add:
```swift
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.3. 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](https://github.com/gokulnair2001/ConfettiKit/blob/master/LICENSE) 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](https://twitter.com/GokulNair2303)๐ฅฐ[](https://www.buymeacoffee.com/gokulnair)
OR
**Drop a star โญ if you find this project interesting!**
Made with โค๏ธ in ๐ฎ๐ณ By Gokul Nair