FireworksKit makes it easy to add amazing particle effects to your UIKit app.
First of all you need to
import FireworksKit
then into the viewDidLoad
of your UIViewController
override func viewDidLoad() {
super.viewDidLoad()
// 1. create a FireworksView
let fireworksView = FireworksView(frame: view.frame)
// 2. create a particle effect
let particleEffect = ParticleEffect(type: .rain) // you can also use .snow, .smoke or .fire
// 3. apply an effect
fireworksView.particleEffect = particleEffect
// 4. add the FireworksView to your view
view.addSubview(fireworksView)
}
You can change the color of the particle effect
fireworksView.particleEffect?.particleColor = .green
TODO
Add this line to your Podfile
pod 'FireworksKit', :git => 'https://github.com/lucaangeletti/FireworksKit.git'
- iOS 9.0+
- Xcode 8+
You can open an Issue and request a new effect.
FireworksKit is released under an MIT license. See License.md for more information.