Releases: EmergeTools/Pow
1.0.5: Let's Go For A Spin
1.0.4: Wiggle and Shake your TV
This release implements #62, #64, #66, and fixes #30. Those are just numbers though, what's in this bad boy?
- You now have more control over the wiggle and shake effect by providing a custom
phaseLength(CGFloat)for theWiggleRateandShakeRatebeyond the built indefaultandfast. - Pow now supports tvOS thanks to @McNight.
- And of course thank you for the documentation improvements @nickkohrn.
1.0.3: Pow's Greatest Hit(s Testing)
This release fixes a minor regression that occurred when open-sourcing Pow, now allowsTouches(false) is properly set on the GlowEffect.
1.0.2: Any Size You Like
This release addresses #46, where Pow wouldn't compile on Xcode 14 due to the ControlSize.extraLarge property introduced in iOS 17/macOS 14.
1.0.1: Where There's Smoke There's Fire
This version fixes (#37), where the smoke effect which was crashing due to missing assets.
Remember kids, don't smoke, but if you must then only do it by using Pow. 🚭
1.0.0: Power To The People
Pow is now free and open source. Thank you @robb, @kasper-lahti, and the whole team at @EmergeTools for making this possible.
Going forward the Pow repository can now be found at https://github.com/EmergeTools/Pow.
If you need assistance upgrading to Pow 1.0.0, we've created a helpful guide to help you through the process.
0.3.1: Glow and Behold
New in 0.3.1
- Fixes an issue where repeat effects would unintentionally trigger when a view (re-)appears.
- Marks Pow as safe for application extensions.
- Reduce the amount of purchase reminders when running Pow in Xcode Previews.
- Fix glow effect preventing hit testing #29
See 0.3.0 for information about Change Effects.
0.3.0: Bool Me Over
0.3.0.mov
New in 0.3.0
Conditional Effects
Pow 0.3.0 introduces a new category of conditional effects that can be enabled or disabled through a boolean flag.
myView
.conditionalEffect(.smoke, condition: isEnabled)
myView
.conditionalEffect(.pushDown, condition: isEnabled)Existing Change Effects can be used using the repeat modifier
myView
.conditionalEffect(.repeat(.jump(height: 100), every: 2), condition: hasUnreadMessages)New Effects
Smoke
A Conditional Effect of smoke coming out the view.
Screen.Recording.2023-03-29.at.16.43.49.mov
myView
.conditionalEffect(.smoke, condition: isEnabled)Glow
Emits a glow whenever a value changes.
glow.mov
myView
.changeEffect(.glow(color: .blue, radius: 50), every: 1.5), value: count)Pulse
Emits a shape from the view.
pushdown.mov
let shape = RoundedRectangle(cornerRadius: 16, style: .continuous)
myView
.conditionalEffect(.pushDown, condition: isPressed)
.changeEffect(.pulse(shape: shape, drawingMode: .stroke, count: 3).delay(0.1), value: value)Push Down
Scales and darkens a view to give it a recessed appearance.
pushdown.mov
myView
.conditionalEffect(.pushDown, condition: isPressed)
.changeEffect(.pulse(shape: shape, drawingMode: .stroke, count: 3).delay(0.1), value: value)
Wiggle
Shakes a view back and forth.
Screen.Recording.2023-03-29.at.16.58.50.mov
myView
.conditionalEffect(.repeat(.wiggle(rate: .fast), every: 2), condition: isCalling)Updated Effects
- The
blurtransition now has a optional radius modifier. - The
vanishtransition now offers the ability to disable the increased brightness effect. - The
spinChange Effect now takes an additionalrateparameter that allows for faster spinning. - The
pingChange Effect has been deprecated in favor ofpulsewith aPulseDrawingModeof.fill. - The
anviltransition is now less susceptible to its particles clipping.
0.2.1: Enlist Catalyst
0.2.0: SoundEffects & Sound Effects
Warning
Edges and angles for
.boing,.glare,.move, and.wipetransitions as well as the.shinechange effect have been changed to be consistent:
.boinghas a new default direction moving from the top instead of the bottom.Anglegiven to these transitions and effects are reversed from what they used to be meaning that a 90° angle now moves towards the bottom edge instead of the top edge.
- Added
soundchange effect. - Added impact and selection haptic feedback types.
- Added
particleLayer(name:)view modifier. .glareand.vanishnow display with increased brightness.- Added
delay(_:)modifier to change effects.
Sound Effects
This version of Pow introduces Sound Effects.
Play sound effects using the .feedback(_:) change effect.
Button(status.buttonLabelText) {
Task {
do {
status = .inProgress
try await processPayment()
status = .paid
} catch {
status = .failed
}
}
}
.changeEffect(.feedback(SoundEffect("sparkle")), value: status == .paid, isEnabled: status == .paid)
.changeEffect(.feedback(SoundEffect("notfound")), value: status == .failed, isEnabled: status == .failed)The sounds are looked up in the main Bundle by default. Common audio formats like aiff, wav, caf, and m4a are found automatically but you can also use other formats by specifying the type and if supported by the OS.
Note
To keep the bundle size minimal, we decided to not bundle any sounds with Pow directly. That said, a selection of sounds can be found in the Pow Example repo and are free to use with any licensed copy of Pow.
Our thanks to @mergesort for the feature requests to add more haptic feedback types and sound change effects 🙇
Haptics
In addition to notification haptics, you can now trigger also selection and impact haptics.
Picker("Color", selection: $color) {
Text("Red").tag(.red)
Text("Green").tag(.green)
Text("Blue").tag(.blue)
}
.pickerStyle(.segmented)
.changeEffect(.feedbackHapticSelection, value: color)Particle Layer
Particle effects such as AnyChangeEffect.spray can now render their particles in a different position in the view tree to avoid being clipped by their immediate ancestor.
For example, certain List styles may clip their rows. Use particleLayer(_:) to render particles on top of the entire List or even its enclosing NavigationStack.
NavigationStack {
List(items) { item in
HStack {
Text(item.title)
Image(systemName: "heart.fill")
.changeEffect(.spray(layer: .named("root")) {
Image(systemName: "heart.fill")
.foregroundStyle(.red)
}, value: item.likes)
}
}
}
.particleLayer(name: "root")Brighter .glare & .vanish
.glare and .vanish transitions now display with increased brightness giving a bit more punch to the effect. And for .glare it makes the shine show even on white backgrounds.
Delay
You can now add a delay to change effects to change the timing of the change effects. This works well with the .shine effect for example where you might want the shine highlight to show some time after the button becomes enabled.
Button("Submit") {
// …
}
.buttonStyle(.borderedProminent)
.disabled(name.isEmpty)
.changeEffect(.shine.delay(1), value: name.isEmpty, isEnabled: !name.isEmpty)If you're interested in using Pow in your app, you can purchase a license on our site. ✨
Thank you for your support!