Skip to content

Releases: laconicman/KaPow

Release list

KaPow 1.0.0

Choose a tag to compare

@laconicman laconicman released this 21 Jul 08:22

Delightful, physics-driven effects for UIKit — a port of Pow.

Pow's effects feel alive because they are simulations, not keyframes. KaPow ports the physics itself — the same integrators, tuning constants and choreography — onto a CADisplayLink driving CALayer, so UIKit apps get the same feel down to iOS 12, with zero dependencies.

answerLabel.kapow.shake()                    // wrong answer
answerLabel.kapow.shine()                    // correct answer
scoreView.kapow.spray(images: [heartImage])  // celebrate
button.kapow.pushDown(isActive: isPressed)   // press state

What's in it

Nine change effects — shake, wiggle, jump, spin, shine, glow, pulse, spray, rise.
Three conditional effects — push down, held glow, smoke — plus repeating(every:isActive:) to repeat any change effect.
Feedback — haptic notification/impact/selection and sound, with Pow's five-event Core Haptics burst on spray.

Why you might prefer it to hosting Pow

SwiftUI hosting can overlay effects on UIKit, but it cannot move UIKit-rendered content — a hosted shake shakes the overlay, not the label underneath. KaPow drives your actual views.

  • Never retains your view or its view controller. A view deallocating mid-effect tears the effect down.
  • Concurrent effects compose through a per-view transform compositor, and your view's own transform survives.
  • Reduce Motion aware; idle-free — frame clocks exist only while an effect runs.

Requirements

iOS 12+. UIKit only — macOS/watchOS/tvOS/Linux builds will fail by design.

.package(url: "https://github.com/laconicman/KaPow.git", from: "1.0.0")

Known limitations

Pow's 18 transitions are not ported — insert/remove choreography is a lifecycle UIKit doesn't have, and a mechanical port would be a different library wearing the same name.

Rendering fidelity was verified side-by-side against Pow by eye rather than measured, and a nuance remains in shake's curve. Shine and glow approximate .sourceAtop by bounds clipping; spin omits upstream's directional shading; particles are clipped by ancestors with clipsToBounds. All tracked in docs/Tech-Debt.md; coverage against Pow's API is in docs/API-Coverage.md.

Credits

Ported from Pow by Emerge Tools (MIT). Every ported file names its upstream source; Pow's licence is reproduced in NOTICE.