A library to easily show 2D animated fireworks on a UIView
- iOS 8.0
SwiftFireworks is a light library that let's you show animated fireworks using CoreAnimation. You only need to specify which UIView you want to show the firework and the position of this one. The library provides two different methods to show them:
// Shows only one firework at a time.
func showFirework(inView view:UIView, andPosition position:CGPoint, radius:CGFloat? = nil, sparkLength:CGFloat? = nil, sparkThickness:CGFloat? = nil, sparkSeparation:CGFloat? = nil, color:UIColor? = nil)
// Shows a set of fireworks
func showFireworkSet(inView view:UIView, andPosition position:CGPoint, numberOfFireworks num:UInt? = nil)
- Import SwiftFireworks library into the file you want to show the fireworks
import SwiftFireworks
- Shoot a firework to the UIView you want
SwiftFireworks.sharedInstance.showFirework(inView: view, andPosition: CGPoint(x: posX, y: posY))
To install it, simply add the following line to your Podfile:
pod "SwiftFireworks"
To install it, add the following line to your Cartfile:
github "enricmacias/SwiftFireworks"
Run carthage update
to build the framework and drag the built SwiftFireworks.framework
into your Xcode project.
Enric Macias Lopez, enric.macias.lopez@gmail.com
SwiftFireworks is available under the MIT license. See the LICENSE file for more info.