Closed robb closed 2 years ago
As always, if you're interested in using Pow in your app, you can now purchase a license on our site. ✨
Thank you for your support!
https://user-images.githubusercontent.com/212465/192332727-3371f9eb-0c12-4c89-8c58-9b9f2cf52679.mov
Version 0.1.0 of Pow introduces Change Effects that will trigger a visual or haptic effect every time a value changes.
Button { post.toggleLike() } label: { Label(post.likes.formatted(), systemName: "heart.fill") } .changeEffect(.spray { heart }, value: post.likes, isEnabled: post.isLiked) .tint(post.isLiked ? .red : .gray)
Currently, you can choose from 8 difference Change Effects:
Emits multiple particles in different shades and sizes moving up from the origin point.
.spray(origin: .center) { Image(systemName: "heart.fill") }
Triggers the given haptic feedback type whenever a value changes.
.hapticFeedback(.success)
Makes the view jump the given height and then bounces a few times before settling.
.jump(height: 50)
Adds one or more shapes that slowly grow and fade-out behind the view.
.ping(shape: Capsule(), style: .red, count: 3)
Emits the provided particle from the origin point and slowly float up while moving side to side.
.rise(origin: .top) { Text("+1") }
Shakes the view when a change happens.
.shake(rate: .fast)
Highlights the view with a shine moving over the view.
.shine
Spins the view around the given axis when a change happens.
.spin(axis: (x: 1, y: 0, z: 0))
.vanish
withAnimation
.anvil
As always, if you're interested in using Pow in your app, you can now purchase a license on our site. ✨
Thank you for your support!
New in 0.1.0
Change effects:
https://user-images.githubusercontent.com/212465/192332727-3371f9eb-0c12-4c89-8c58-9b9f2cf52679.mov
Version 0.1.0 of Pow introduces Change Effects that will trigger a visual or haptic effect every time a value changes.
Currently, you can choose from 8 difference Change Effects:
Spray
Emits multiple particles in different shades and sizes moving up from the origin point.
Haptic Feedback
Triggers the given haptic feedback type whenever a value changes.
Jump
Makes the view jump the given height and then bounces a few times before settling.
Ping
Adds one or more shapes that slowly grow and fade-out behind the view.
Rise
Emits the provided particle from the origin point and slowly float up while moving side to side.
Shake
Shakes the view when a change happens.
Shine
Highlights the view with a shine moving over the view.
Spin
Spins the view around the given axis when a change happens.
Quality of Life Improvements
.vanish
now takes an optional mask used to determine where the particles are emitted from..vanish
now respects non-default animation curves specified inwithAnimation
etc..anvil
.