PKImageSpark
Some Cool Animations written in Swift
Requirements
- iOS 8.0+
- Xcode 9.2
Installation
For manual instalation, drag Source folder into your project.
os use CocoaPod adding this line to you Podfile:
pod 'PKImageSpark'Usage
In Code
-
Create a instance of
PKImageSparkwith customised of default configurations and pass anUIImagethat will spark -
Just call
startSparking()method for animation
Example:
let confg = PKSparkConfiguration()
confg.sparkOnView = self.view
confg.sparkGenerationView = self.clickButton
confg.totalNumberOfSparkImages = 15
confg.sparkAnimation = .bubbleToUpSide
let sparkAnimation = PKImageSpark(withImage: #imageLiteral(resourceName: "ic_love"), configuration: confg)
sparkAnimation.startSparking()Licence
PKImageSpark is released under the MIT license.
