Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/onmyway133/EasyConfetti
🎊 Fancy confetti effects in Swift
https://github.com/onmyway133/EasyConfetti
cheer confetti effect ios particle
Last synced: 3 months ago
JSON representation
🎊 Fancy confetti effects in Swift
- Host: GitHub
- URL: https://github.com/onmyway133/EasyConfetti
- Owner: onmyway133
- License: other
- Created: 2017-06-22T14:37:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-08T21:14:12.000Z (almost 3 years ago)
- Last Synced: 2024-07-21T18:39:41.973Z (4 months ago)
- Topics: cheer, confetti, effect, ios, particle
- Language: Swift
- Homepage: https://onmyway133.com
- Size: 8.22 MB
- Stars: 561
- Watchers: 13
- Forks: 46
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# EasyConfetti
❤️ Support my apps ❤️
- [Push Hero - pure Swift native macOS application to test push notifications](https://onmyway133.com/pushhero)
- [PastePal - Pasteboard, note and shortcut manager](https://onmyway133.com/pastepal)
- [My other apps](https://onmyway133.com/apps/)❤️❤️😇😍🤘❤️❤️
## Usage
### Basic
```swift
// Create the view
let confettiView = ConfettiView()
view.addSubview(confettiView)// Configure
confettiView.config.particle = .confetti(allowedShapes: Particle.ConfettiShape.all)// Start
confettiView.start()// Stop
confettiView.stop()
```### Configuration
Configuration will be applied at the next `start`
```swift
// Use predefined confetti
confettiView.config.particle = .confetti(allowedShapes: Particle.ConfettiShape.all)// Use texts
let string = NSAttributedString(string: "❤️", attributes: [
NSFontAttributeName: UIFont.systemFont(ofSize: 15)
])
confettiView.config.particle = .text([string])// Use images
let image = UIImage(named: "star")
confettiView.config.particle = .image([image])// Change colors
confettiView.config.colors = [UIColor.red, UIColor.green]// Customize cells
confettiView.config.customize = { cells in}
```## Installation
**EasyConfetti** is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'EasyConfetti'
```**EasyConfetti** is also available through [Carthage](https://github.com/Carthage/Carthage).
To install just write into your Cartfile:```ruby
github "hyperoslo/EasyConfetti"
```**EasyConfetti** is also available through [Accio](https://github.com/JamitLabs/Accio).
To install just write into your Package.swift:```swift
.package(url: "https://github.com/onmyway133/EasyConfetti.git", .upToNextMajor(from: "2.3.0")),
```Then link `EasyConfetti` in your App target like so:
```swift
.target(
name: "App",
dependencies: [
"EasyConfetti",
]
),
```**EasyConfetti** can also be installed manually. Just download and drop `Sources` folders in your project.
## Author
- Khoa Pham, [email protected]
## Credit
- Hyper Interaktiv AS, [email protected]
- Background image in the demo is from http://www.freepik.com/## Contributing
We would love you to contribute to **EasyConfetti**, check the [CONTRIBUTING](https://github.com/hyperoslo/EasyConfetti/blob/master/CONTRIBUTING.md) file for more info.
## License
**EasyConfetti** is available under the MIT license. See the [LICENSE](https://github.com/hyperoslo/EasyConfetti/blob/master/LICENSE.md) file for more info.