Skip to content

PPEffectButton is a UIButton subClass it has a cool effect, even though it can be used anywhere you can use a UIButton.

License

Notifications You must be signed in to change notification settings

HikaruSato/PPParticleButton

Repository files navigation

PPParticleButton

PPParticleButton is a UIButton subClass it has a cool tap animation, even though it can be used anywhere you can use a UIButton. PPParticleButton uses SKEmitterNode of SpriteKit, to create the tap animation. alt animation image


## Requirements
  • iOS 8.0+
  • Xcode 7.2+

Installation

Create a Podfile.

platform :ios, '8.0'
use_frameworks!
pod 'PPParticleButton'

Execute 'pod install'

$ pod install

Usage

  1. Select File->New->File...->Resource->SpriteKit Particle File, and create a sksFile.

  2. Cutomize the SksFile on Xcode. Cutomize the SksFile

  3. Initialize a PPParticleButton class on code. or set to "PPParticleButton" of button's className on storyboard. Set to "PPParticleButton" of button's className

  4. And only after you set the sksFile name (excluding the extension) to particleFileNameMap property of PPPerticleButton.

  • When tapped, works animation always.
ppparticleButton.particleFileNameMap[PPParticleButtonEffectType.Normal] = "sksFile name"

  • When tapped, works animation during button unselected.
ppparticleButton.particleFileNameMap[PPParticleButtonEffectType.UnSelected] = "sksFile name"

* When tapped, works animation during selected.
ppparticleButton.particleFileNameMap[PPParticleButtonEffectType.Selected] = "sksFile name"

Detail

For more information, please refer to PPParticleButtonExample project.

About

PPEffectButton is a UIButton subClass it has a cool effect, even though it can be used anywhere you can use a UIButton.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published