Skip to content

Releases: EmergeTools/Pow

1.0.5: Let's Go For A Spin

10 Nov 04:18
a504eb6
Compare
Choose a tag to compare
  • SpinRate now provides a new velocity case, which allows for more fine-grained control over the spin animation. You can also control it as the new multiplier parameter on the static func version of spin.

1.0.4: Wiggle and Shake your TV

19 May 18:48
f0d0f3e
Compare
Choose a tag to compare

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 the WiggleRate and ShakeRate beyond the built in default and fast.
  • 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)

16 Dec 05:04
cc014eb
Compare
Choose a tag to compare

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

05 Dec 15:05
c24472e
Compare
Choose a tag to compare

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

30 Nov 17:29
825e0f1
Compare
Choose a tag to compare

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

29 Nov 14:55
Compare
Choose a tag to compare

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

03 Jun 10:36
c675f0b
Compare
Choose a tag to compare

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

26 Apr 20:53
165d6d7
Compare
Choose a tag to compare
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 blur transition now has a optional radius modifier.
  • The vanish transition now offers the ability to disable the increased brightness effect.
  • The spin Change Effect now takes an additional rate parameter that allows for faster spinning.
  • The ping Change Effect has been deprecated in favor of pulse with a PulseDrawingMode of .fill.
  • The anvil transition is now less susceptible to its particles clipping.

0.2.1: Enlist Catalyst

01 Mar 11:42
d07a88a
Compare
Choose a tag to compare
  • Added official support for Catalyst and macOS.

0.2.0: SoundEffects & Sound Effects

18 Jan 14:00
0d063d4
Compare
Choose a tag to compare

Warning

Edges and angles for .boing, .glare, .move, and .wipe transitions as well as the .shine change effect have been changed to be consistent:

  • .boing has a new default direction moving from the top instead of the bottom.
  • Angle given 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 sound change effect.
  • Added impact and selection haptic feedback types.
  • Added particleLayer(name:) view modifier.
  • .glare and .vanish now 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!