Some Cool Animations written in Swift
- iOS 8.0+
- Xcode 9.2
For manual instalation, drag Source folder into your project.
os use CocoaPod adding this line to you Podfile
:
pod 'PKImageSpark'
-
Create a instance of
PKImageSpark
with customised of default configurations and pass anUIImage
that 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()
PKImageSpark is released under the MIT license.