### Install Xcode Command Line Tools Source: https://github.com/emergetools/pow/blob/main/Fastlane/README.md Ensures the latest version of Xcode command line tools are installed, a prerequisite for Fastlane. ```shell xcode-select --install ``` -------------------------------- ### Configure Shake Change Effect with Rate Source: https://github.com/emergetools/pow/blob/main/README.md This example demonstrates how to configure the shake change effect by specifying the rate of the shake. This allows for finer control over the shaking motion. ```swift static func shake(rate: ShakeRate) -> AnyChangeEffect ``` -------------------------------- ### Configure Spray Change Effect with Origin and Particles Source: https://github.com/emergetools/pow/blob/main/README.md This example shows how to configure the spray change effect with a specific origin and particles to emit. It's useful for customizing the visual appearance of the spray effect. ```swift likeButton .changeEffect( .spray(origin: .center) { Image(systemName: "heart.fill") }, value: likes ) ``` -------------------------------- ### Configure Ping Change Effect with Shape and Count Source: https://github.com/emergetools/pow/blob/main/README.md This example shows how to configure the ping change effect using a specific shape and count for the growing, fading shapes. The shapes are colored by the current tint style. ```swift static func ping(shape: some InsettableShape, count: Int) -> AnyChangeEffect ``` -------------------------------- ### Glare Transition Source: https://github.com/emergetools/pow/blob/main/README.md A transition that combines a diagonal wipe with a colored streak. The angle of the wipe and the color of the streak can be customized. This example shows asymmetric insertion and removal with custom animations. ```swift static var glare: AnyTransition ``` ```swift static func glare(angle: Angle, color: Color = .white) -> AnyTransition ``` ```swift infoBox .transition( .asymmetric( insertion: .movingParts.glare(angle: .degrees(225)), removal: .movingParts.glare(angle: .degrees(45)) ) .animation(.movingParts.easeInExponential(duration: 0.9)) .combined( .scale(scale: 1.4) .animation(.movingParts.anticipate(duration: 0.9).delay(0.1)) ) ) ) ``` -------------------------------- ### Run Fastlane iOS Build Action Source: https://github.com/emergetools/pow/blob/main/Fastlane/README.md Executes the 'build' action for iOS using Fastlane. The 'bundle exec' prefix is optional and depends on your project setup. ```shell [bundle exec] fastlane ios build ``` -------------------------------- ### Delay Change Effect Source: https://github.com/emergetools/pow/blob/main/README.md Applies a delay to a change effect, triggering it after a specified duration. This example shows delaying the shine effect. ```swift Button("Submit") { <#code#> } .buttonStyle(.borderedProminent) .disabled(name.isEmpty) .changeEffect(.shine.delay(1), value: name.isEmpty, isEnabled: !name.isEmpty) ``` -------------------------------- ### Snapshot Transition Source: https://github.com/emergetools/pow/blob/main/README.md A transition that animates a view from completely bright to fully visible on insertion, and from fully visible to completely bright on removal. ```APIDOC ## Snapshot Transition ### Description A transition from completely bright to fully visible on insertion, and from fully visible to completely bright on removal. ### Signature ```swift static var snapshot: AnyTransition ``` ``` -------------------------------- ### Snapshot Transition Source: https://github.com/emergetools/pow/blob/main/README.md A transition that animates from bright to fully visible on insertion, and vice versa on removal. ```swift static var snapshot: AnyTransition ``` -------------------------------- ### glare (default) Source: https://github.com/emergetools/pow/blob/main/README.md A transition that shows the view by combining a diagonal wipe with a white streak. This is the default glare transition. ```APIDOC ## glare ### Description A transition that shows the view by combining a diagonal wipe with a white streak. ### Transition `.movingParts.glare` ### Type `static var glare: AnyTransition` ``` -------------------------------- ### anvil Source: https://github.com/emergetools/pow/blob/main/README.md A transition that drops the view down from the top with matching haptic feedback. It is only performed on insertion and takes 1.4 seconds. ```APIDOC ## anvil ### Description A transition that drops the view down from the top with matching haptic feedback. The transition is only performed on insertion and takes 1.4 seconds. ### Transition `.movingParts.anvil` ### Type `static var anvil: AnyTransition` ``` -------------------------------- ### Pop Transition (Default) Source: https://github.com/emergetools/pow/blob/main/README.md A default pop transition that displays a view with a ripple effect and a flurry of tint-colored particles on insertion. ```APIDOC ## Pop Transition (Default) ### Description A transition that shows a view with a ripple effect and a flurry of tint-colored particles. The transition is only performed on insertion and takes 1.2 seconds. ### Signature ```swift static var pop: AnyTransition ``` ``` -------------------------------- ### Pop Transition (with Style) Source: https://github.com/emergetools/pow/blob/main/README.md A transition that displays a view with a ripple effect and colored particles, primarily used on insertion. It allows customization of the particle style. ```APIDOC ## Pop Transition (with Style) ### Description A transition that shows a view with a ripple effect and a flurry of colored particles. The transition is only performed on insertion. ### Parameters - `style` (S) - Required - The style to use for the effect. ### Signature ```swift static func pop(_ style: S) -> AnyTransition ``` ### Example ```swift Button { starred.toggle() } label: { if starred { Image(systemName: "star.fill") .foregroundStyle(.orange) .transition(.movingParts.pop(.orange)) } else { Image(systemName: "star") .foregroundStyle(.gray) .transition(.identity) } } ``` ``` -------------------------------- ### Add Pow Product to Target Source: https://github.com/emergetools/pow/blob/main/README.md Link the 'Pow' product from the added package to your target in Swift Package Manager. ```swift .product(name: "Pow", package: "Pow") ``` -------------------------------- ### Anvil Transition Source: https://github.com/emergetools/pow/blob/main/README.md A transition that drops a view from the top with haptic feedback. It only occurs on insertion and lasts 1.4 seconds. ```swift static var anvil: AnyTransition ``` -------------------------------- ### Vanish (Default) Source: https://github.com/emergetools/pow/blob/main/README.md A transition that dissolves the view into many small particles. This transition is only performed on removal. It uses an ease-out animation with a duration of 900ms if the current Animation is .default. ```APIDOC ## Vanish (Default) ### Description A transition that dissolves the view into many small particles. The transition is only performed on removal. ### Method static var vanish: AnyTransition ### Parameters None ### Request Example ```swift // Example usage would depend on the surrounding SwiftUI context ``` ### Response #### Success Response - AnyTransition: The vanish transition. #### Response Example ```swift // No direct response example, as it's a transition type ``` ``` -------------------------------- ### Rotate3D Transition Source: https://github.com/emergetools/pow/blob/main/README.md A 3D transition that inserts by rotating from a specified rotation and removes by rotating to a specified rotation. It allows control over angle, axis, anchor, and perspective. ```APIDOC ## Rotate3D Transition ### Description A transition that inserts by rotating from the specified rotation, and removes by rotating to the specified rotation in three dimensions. ### Parameters - `angle` (Angle) - Required - The angle from which to rotate the view. - `axis` ((x: CGFloat, y: CGFloat, z: CGFloat)) - Required - The x, y and z elements that specify the axis of rotation. - `anchor` (UnitPoint) - Optional - The location with a default of center that defines a point in 3D space about which the rotation is anchored. Defaults to `.center`. - `anchorZ` (CGFloat) - Optional - The location with a default of 0 that defines a point in 3D space about which the rotation is anchored. Defaults to `0`. - `perspective` (CGFloat) - Optional - The relative vanishing point with a default of 1 for this rotation. Defaults to `1`. ### Signature ```swift static func rotate3D(_ angle: Angle, axis: (x: CGFloat, y: CGFloat, z: CGFloat), anchor: UnitPoint = .center, anchorZ: CGFloat = 0, perspective: CGFloat = 1) -> AnyTransition ``` ### Example ```swift Text("Hello") .transition(.movingParts.rotate3D( .degrees(90), axis: (1, 0, 0), anchor: .bottom, perspective: 1.0 / 6.0) ) ``` ``` -------------------------------- ### Swoosh Transition Source: https://github.com/emergetools/pow/blob/main/README.md A three-dimensional transition that moves a view from the back towards the front during insertion, and from the front towards the back during removal. ```APIDOC ## Swoosh Transition ### Description A three-dimensional transition from the back of the towards the front during insertion and from the front towards the back during removal. ### Signature ```swift static var swoosh: AnyTransition ``` ``` -------------------------------- ### Vanish (Style, Mask, EoFill) Source: https://github.com/emergetools/pow/blob/main/README.md A transition that dissolves the view into many small particles following a given shape, style, and fill rule. This transition is only performed on removal. It uses an ease-out animation with a duration of 900ms if the current Animation is .default. ```APIDOC ## Vanish (Style, Mask, EoFill) ### Description A transition that dissolves the view into many small particles following a given shape. The transition is only performed on removal. ### Method static func vanish(_ style: T, mask: S, eoFill: Bool = false) -> AnyTransition ### Parameters #### Path Parameters - **style** (T: ShapeStyle) - Required - The style to use for the particles. - **mask** (S: Shape) - Required - The mask that determines where particles should be placed. - **eoFill** (Bool) - Optional - A Boolean that indicates whether the shape is interpreted with the even-odd winding number rule. Defaults to false. ### Request Example ```swift // Example usage would depend on the surrounding SwiftUI context ``` ### Response #### Success Response - AnyTransition: The vanish transition with specified style, mask, and fill rule. #### Response Example ```swift // No direct response example, as it's a transition type ``` ``` -------------------------------- ### Vanish (Style) Source: https://github.com/emergetools/pow/blob/main/README.md A transition that dissolves the view into many small particles following a given style. This transition is only performed on removal. It uses an ease-out animation with a duration of 900ms if the current Animation is .default. ```APIDOC ## Vanish (Style) ### Description A transition that dissolves the view into many small particles following a given style. The transition is only performed on removal. ### Method static func vanish(_ style: S) -> AnyTransition ### Parameters #### Path Parameters - **style** (S: ShapeStyle) - Required - The style to use for the particles. ### Request Example ```swift // Example usage would depend on the surrounding SwiftUI context ``` ### Response #### Success Response - AnyTransition: The vanish transition with a specified style. #### Response Example ```swift // No direct response example, as it's a transition type ``` ``` -------------------------------- ### Configure Ping Change Effect with Shape, Style, and Count Source: https://github.com/emergetools/pow/blob/main/README.md This snippet demonstrates an alternative configuration for the ping change effect, allowing specification of the shape, style, and count of the emitted shapes. ```swift static func ping(shape: some InsettableShape, style: some ShapeStyle, count: Int) -> AnyChangeEffect ``` -------------------------------- ### Apply Haptic Feedback Selection Change Source: https://github.com/emergetools/pow/blob/main/README.md This code demonstrates how to trigger haptic feedback specifically for indicating a change in selection. This is often used in lists or pickers. ```swift static var feedbackHapticSelection: AnyChangeEffect ``` -------------------------------- ### Skid Transition (by Direction) Source: https://github.com/emergetools/pow/blob/main/README.md A transition that moves the view in from a specified direction during insertion and towards it during removal, with elastic deformation for any overshoot. ```APIDOC ## Skid Transition (by Direction) ### Description A transition that moves the view in from the specified edge during insertion and towards it during removal with any overshoot resulting in an elastic deformation of the view. ### Parameters - `direction` (SkidDirection) - Required - The direction of the transition. ### Signature ```swift static func skid(direction: SkidDirection) -> AnyTransition ``` ``` -------------------------------- ### blinds Source: https://github.com/emergetools/pow/blob/main/README.md A transition that reveals the view as if it was behind window blinds. It can be configured with slat width, style, and staggering. ```APIDOC ## blinds(slatWidth: CGFloat, style: BlindsStyle = .venetian, isStaggered: Bool = false) ### Description A transition that reveals the view as if it was behind window blinds. You can customize the width of each slat, the style of the blinds (venetian or vertical), and whether the slats open in sequence or all at once. ### Parameters - **slatWidth** (CGFloat) - Required - The width of each slat. - **style** (BlindsStyle) - Optional - The style of blinds, either `.venetian` or `.vertical`. Defaults to `.venetian`. - **isStaggered** (Bool) - Optional - Whether all slats open at the same time or in sequence. Defaults to `false`. ### Transition `.movingParts.blinds(slatWidth:style:isStaggered:)` ### Type `static func blinds(slatWidth: CGFloat, style: BlindsStyle = .venetian, isStaggered: Bool = false) -> AnyTransition` ``` -------------------------------- ### Rotate3D Transition Source: https://github.com/emergetools/pow/blob/main/README.md Inserts by rotating from a specified angle and removes by rotating to it in 3D. Customize angle, axis, anchor, and perspective. ```swift Text("Hello") .transition(.movingParts.rotate3D( .degrees(90), axis: (1, 0, 0), anchor: .bottom, perspective: 1.0 / 6.0) ) ``` ```swift static func rotate3D(_ angle: Angle, axis: (x: CGFloat, y: CGFloat, z: CGFloat), anchor: UnitPoint = .center, anchorZ: CGFloat = 0, perspective: CGFloat = 1) -> AnyTransition ``` -------------------------------- ### Blinds Transition Source: https://github.com/emergetools/pow/blob/main/README.md A transition that reveals a view as if it were behind window blinds. It can be configured with slat width, style (venetian or vertical), and staggering. ```swift static var blinds: AnyTransition ``` ```swift static func blinds(slatWidth: CGFloat, style: BlindsStyle = .venetian, isStaggered: Bool = false) -> AnyTransition ``` -------------------------------- ### Poof Transition Source: https://github.com/emergetools/pow/blob/main/README.md A transition that removes a view in a dissolving cartoon-style cloud. This transition is only performed on removal and is quick. ```APIDOC ## Poof Transition ### Description A transition that removes the view in a dissolving cartoon style cloud. The transition is only performed on removal and takes 0.4 seconds. ### Signature ```swift static var poof: AnyTransition ``` ``` -------------------------------- ### blur Source: https://github.com/emergetools/pow/blob/main/README.md A transition that animates the view from blurry to sharp on insertion, and from sharp to blurry on removal. ```APIDOC ## blur ### Description A transition that animates the view from blurry to sharp on insertion, and from sharp to blurry on removal. ### Transition `.movingParts.blur` ### Type `static var blur: AnyTransition` ``` -------------------------------- ### Apply a Transition Source: https://github.com/emergetools/pow/blob/main/README.md Transitions are accessed via the `movingParts` static variable. Apply transitions to views using the `.transition()` modifier. ```swift myView.transition(.movingParts.anvil) ``` -------------------------------- ### Pop Transition with Style Source: https://github.com/emergetools/pow/blob/main/README.md Applies a ripple and particle effect on insertion. Use with a specific shape style for the effect. ```swift Button { starred.toggle() } label: { if starred { Image(systemName: "star.fill") .foregroundStyle(.orange) .transition(.movingParts.pop(.orange)) } else { Image(systemName: "star") .foregroundStyle(.gray) .transition(.identity) } } ``` ```swift static func pop(_ style: S) -> AnyTransition ``` -------------------------------- ### Swoosh Transition Source: https://github.com/emergetools/pow/blob/main/README.md A 3D transition that moves the view from back to front on insertion and front to back on removal. ```swift static var swoosh: AnyTransition ``` -------------------------------- ### Wipe Transition by Edge and Blur Radius Source: https://github.com/emergetools/pow/blob/main/README.md A transition using a sweep from the specified edge on insertion, and towards it on removal. A blur radius can be applied to the mask. ```swift static func wipe(edge: Edge, blurRadius: CGFloat = 0) -> AnyTransition ``` -------------------------------- ### Default Pop Transition Source: https://github.com/emergetools/pow/blob/main/README.md A default pop transition with a ripple and particle effect, performed only on insertion. ```swift static var pop: AnyTransition ``` -------------------------------- ### Skid Transition Source: https://github.com/emergetools/pow/blob/main/README.md Moves a view in from its leading edge with elastic deformation on overshoot during insertion. This is the default skid behavior. ```swift static var skid: AnyTransition ``` -------------------------------- ### Add Swift Package Dependency Source: https://github.com/emergetools/pow/blob/main/README.md Add the Pow package to your Xcode project by specifying the repository URL and version. ```swift .package(url: "https://github.com/EmergeTools/Pow", from: Version(1, 0, 0)) ``` -------------------------------- ### Skid Transition (Default) Source: https://github.com/emergetools/pow/blob/main/README.md A transition that moves the view in from its leading edge with an elastic deformation for any overshoot. ```APIDOC ## Skid Transition (Default) ### Description A transition that moves the view in from its leading edge with any overshoot resulting in an elastic deformation of the view. ### Signature ```swift static var skid: AnyTransition ``` ``` -------------------------------- ### clock (default) Source: https://github.com/emergetools/pow/blob/main/README.md A transition using a clockwise sweep around the centerpoint of the view. This is the default clock transition. ```APIDOC ## clock ### Description A transition using a clockwise sweep around the centerpoint of the view. ### Transition `.movingParts.clock` ### Type `static var clock: AnyTransition` ``` -------------------------------- ### Poof Transition Source: https://github.com/emergetools/pow/blob/main/README.md Removes a view in a dissolving cartoon style cloud. This transition is only performed on removal. ```swift static var poof: AnyTransition ``` -------------------------------- ### flip Source: https://github.com/emergetools/pow/blob/main/README.md A transition that inserts by rotating the view towards the viewer and removes by rotating it away, with potential overshoot. ```APIDOC ## flip ### Description A transition that inserts by rotating the view towards the viewer, and removes by rotating the view away from the viewer. Any overshoot of the animation will result in the view continuing the rotation past its normal state before settling. ### Transition `.movingParts.flip` ### Type `static var flip: AnyTransition` ``` -------------------------------- ### boing (default) Source: https://github.com/emergetools/pow/blob/main/README.md A transition that moves the view down with overshoot, resulting in an elastic deformation. This is the default boing transition. ```APIDOC ## boing ### Description A transition that moves the view down with any overshoot, resulting in an elastic deformation of the view. ### Transition `.movingParts.boing` ### Type `static var boing: AnyTransition` ``` -------------------------------- ### flicker (default) Source: https://github.com/emergetools/pow/blob/main/README.md A transition that toggles the visibility of the view multiple times before settling. This is the default flicker transition. ```APIDOC ## flicker ### Description A transition that toggles the visibility of the view multiple times before settling. ### Transition `.movingParts.flicker` ### Type `static var flicker: AnyTransition` ``` -------------------------------- ### Move Transition (by Edge) Source: https://github.com/emergetools/pow/blob/main/README.md A transition that moves a view from a specified edge on insertion and towards that edge on removal. ```APIDOC ## Move Transition (by Edge) ### Description A transition that moves the view from the specified edge of the on insertion and towards it on removal. ### Parameters - `edge` (Edge) - Required - The edge from which the view moves. ### Signature ```swift static func move(edge: Edge) -> AnyTransition ``` ``` -------------------------------- ### Apply Haptic Feedback Impact Source: https://github.com/emergetools/pow/blob/main/README.md This snippet shows how to trigger haptic feedback to simulate physical impacts. It's useful for indicating actions that have a tactile feel. ```swift static func feedback(hapticImpact style: UIImpactFeedbackGenerator.FeedbackStyle) -> AnyChangeEffect ``` -------------------------------- ### Haptic Feedback (Selection) Source: https://github.com/emergetools/pow/blob/main/README.md Triggers haptic feedback to indicate a change in selection whenever a value changes. ```APIDOC ## Haptic Feedback (Selection) ### Description Triggers haptic feedback to indicate a change in selection whenever a value changes. ### Method Signature ```swift static var feedbackHapticSelection: AnyChangeEffect ``` ``` -------------------------------- ### Skid Transition by Direction Source: https://github.com/emergetools/pow/blob/main/README.md Moves a view in from a specified direction during insertion and towards it during removal, with elastic deformation on overshoot. Use `SkidDirection` to specify. ```swift static func skid(direction: SkidDirection) -> AnyTransition ``` -------------------------------- ### Wipe Transition by Angle and Blur Radius Source: https://github.com/emergetools/pow/blob/main/README.md A transition using a sweep at a specified angle. The angle is relative to the current layoutDirection. A blur radius can be applied to the mask. ```swift static func wipe(angle: Angle, blurRadius: CGFloat = 0) -> AnyTransition ``` -------------------------------- ### Move Transition (by Angle) Source: https://github.com/emergetools/pow/blob/main/README.md A transition that moves a view at a specified angle relative to the layout direction. This allows for directional animations during insertion and removal. ```APIDOC ## Move Transition (by Angle) ### Description A transition that moves the view at the specified angle. The angle is relative to the current `layoutDirection`, such that 0° represents animating towards the trailing edge on insertion and 90° represents inserting towards the bottom edge. ### Parameters - `angle` (Angle) - Required - The direction of the animation. ### Signature ```swift static func move(angle: Angle) -> AnyTransition ``` ### Example ```swift Text("Hello") .transition( .asymmetric( insertion: .movingParts.move(angle: .degrees(45)), removal: .movingParts.move(angle: .degrees(90)) ) ) ``` ``` -------------------------------- ### boing (edge) Source: https://github.com/emergetools/pow/blob/main/README.md A transition that moves the view from a specified edge on insertion and towards it on removal, with elastic overshoot. ```APIDOC ## boing(edge: Edge) ### Description A transition that moves the view from the specified edge on insertion, and towards it on removal, with any overshoot resulting in an elastic deformation of the view. ### Parameters - **edge** (Edge) - Required - The edge from which the view enters or exits. ### Transition `.movingParts.boing(edge:)` ### Type `static func boing(edge: Edge) -> AnyTransition` ``` -------------------------------- ### Boing Transition Source: https://github.com/emergetools/pow/blob/main/README.md A transition that causes a view to bounce down from the top with elastic deformation. It can also be configured to move from a specified edge. ```swift static var boing: AnyTransition ``` ```swift static func boing(edge: Edge) -> AnyTransition ``` -------------------------------- ### Apply Default Shake Change Effect Source: https://github.com/emergetools/pow/blob/main/README.md This code snippet shows how to apply the default shake change effect. The view will shake when a change occurs. ```swift static var shake: AnyChangeEffect ``` -------------------------------- ### Move Transition by Edge Source: https://github.com/emergetools/pow/blob/main/README.md Moves a view from a specified edge on insertion and towards it on removal. The `edge` parameter determines the direction. ```swift static func move(edge: Edge) -> AnyTransition ``` -------------------------------- ### Blur Transition Source: https://github.com/emergetools/pow/blob/main/README.md A transition that animates between blurry and sharp states. It blurs on removal and sharpens on insertion. ```swift static var blur: AnyTransition ``` -------------------------------- ### glare (angle, color) Source: https://github.com/emergetools/pow/blob/main/README.md A transition that shows the view by combining a wipe with a colored streak at a specified angle. ```APIDOC ## glare(angle: Angle, color: Color = .white) ### Description A transition that shows the view by combining a wipe with a colored streak. The angle is relative to the current layout direction. The color of the glare effect can be customized. ### Parameters - **angle** (Angle) - Required - The angle of the wipe. - **color** (Color) - Optional - The color of the glare effect. Defaults to `.white`. ### Transition `.movingParts.glare(angle:color:)` ### Type `static func glare(angle: Angle, color: Color = .white) -> AnyTransition` ``` -------------------------------- ### Wipe (Edge, BlurRadius) Source: https://github.com/emergetools/pow/blob/main/README.md A transition using a sweep from the specified edge on insertion, and towards it on removal. It includes an optional blur radius. ```APIDOC ## Wipe (Edge, BlurRadius) ### Description A transition using a sweep from the specified edge on insertion, and towards it on removal. ### Method static func wipe(edge: Edge, blurRadius: CGFloat = 0) -> AnyTransition ### Parameters #### Path Parameters - **edge** (Edge) - Required - The edge at which the sweep starts or ends. - **blurRadius** (CGFloat) - Optional - The radius of the blur applied to the mask. Defaults to 0. ### Request Example ```swift // Example usage would depend on the surrounding SwiftUI context ``` ### Response #### Success Response - AnyTransition: The wipe transition based on edge and blur radius. #### Response Example ```swift // No direct response example, as it's a transition type ``` ``` -------------------------------- ### Haptic Feedback (Impact) Source: https://github.com/emergetools/pow/blob/main/README.md Triggers haptic feedback to simulate physical impacts whenever a value changes, using `UIImpactFeedbackGenerator.FeedbackStyle`. ```APIDOC ## Haptic Feedback (Impact) ### Description Triggers haptic feedback to simulate physical impacts whenever a value changes. ### Method Signature ```swift static func feedback(hapticImpact style: UIImpactFeedbackGenerator.FeedbackStyle) -> AnyChangeEffect ``` ### Parameters - **style** (UIImpactFeedbackGenerator.FeedbackStyle) - The feedback style to trigger. ``` -------------------------------- ### Spin Effect with Custom Parameters Source: https://github.com/emergetools/pow/blob/main/README.md Spins the view around a specified axis with customizable anchor, anchorZ, and perspective. ```swift static func spin(axis: (x: CGFloat, y: CGFloat, z: CGFloat), anchor: UnitPoint = .center, anchorZ: CGFloat = 0, perspective: CGFloat = 1 / 6) -> AnyChangeEffect ``` -------------------------------- ### Shine Effect with Duration Source: https://github.com/emergetools/pow/blob/main/README.md Applies a shine effect with a specified duration. ```swift static func shine(duration: Double) -> AnyChangeEffect ``` -------------------------------- ### Apply Haptic Feedback Notification Source: https://github.com/emergetools/pow/blob/main/README.md This code snippet demonstrates how to trigger haptic feedback using a notification type when a value changes. Use this for success, failure, or warning feedback. ```swift static func feedback(hapticNotification type: UINotificationFeedbackGenerator.FeedbackType) -> AnyChangeEffect ``` -------------------------------- ### Flip Transition Source: https://github.com/emergetools/pow/blob/main/README.md A transition that rotates the view towards the viewer on insertion and away on removal. It can overshoot for an elastic effect. ```swift static var flip: AnyTransition ``` -------------------------------- ### Move Transition by Angle Source: https://github.com/emergetools/pow/blob/main/README.md Moves a view at a specified angle relative to the layout direction. Use for custom directional animations. ```swift Text("Hello") .transition( .asymmetric( insertion: .movingParts.move(angle: .degrees(45)), removal: .movingParts.move(angle: .degrees(90)) ) ) ``` ```swift static func move(angle: Angle) -> AnyTransition ``` -------------------------------- ### Iris Transition Source: https://github.com/emergetools/pow/blob/main/README.md Creates a circular growing or shrinking transition. Use with custom origin and blur radius. ```swift static func iris(origin: UnitPoint = .center, blurRadius: CGFloat = 0) -> AnyTransition ``` -------------------------------- ### Apply Spray Change Effect to Button Source: https://github.com/emergetools/pow/blob/main/README.md This snippet demonstrates how to apply a spray change effect to a button when it's tapped and toggles a like status. The effect is configured to watch the `post.likes` value. ```swift 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) ``` -------------------------------- ### filmExposure Source: https://github.com/emergetools/pow/blob/main/README.md A transition from completely dark to fully visible on insertion, and from fully visible to completely dark on removal. ```APIDOC ## filmExposure ### Description A transition from completely dark to fully visible on insertion, and from fully visible to completely dark on removal. ### Transition `.movingParts.filmExposure` ### Type `static var filmExposure: AnyTransition` ``` -------------------------------- ### Shine Effect (Default) Source: https://github.com/emergetools/pow/blob/main/README.md Applies a default shine effect to a view, moving from the top leading edge to the bottom trailing edge. ```swift static var shine: AnyChangeEffect ``` -------------------------------- ### Iris Transition Source: https://github.com/emergetools/pow/blob/main/README.md A transition that animates a view using a growing or shrinking circle mask. It supports custom origin points and blur radii. ```APIDOC ## Iris Transition ### Description A transition that takes the shape of a growing circle when inserting, and a shrinking circle when removing. ### Parameters - `origin` (UnitPoint) - Optional - The center point of the circle as it grows or shrinks. Defaults to `.center`. - `blurRadius` (CGFloat) - Optional - The radius of the blur applied to the mask. Defaults to `0`. ### Signature ```swift static func iris(origin: UnitPoint = .center, blurRadius: CGFloat = 0) -> AnyTransition ``` ``` -------------------------------- ### Wipe (Angle, BlurRadius) Source: https://github.com/emergetools/pow/blob/main/README.md A transition using a sweep at the specified angle. The angle is relative to the current layoutDirection. It includes an optional blur radius. ```APIDOC ## Wipe (Angle, BlurRadius) ### Description A transition using a sweep at the specified angle. The angle is relative to the current layoutDirection. ### Method static func wipe(angle: Angle, blurRadius: CGFloat = 0) -> AnyTransition ### Parameters #### Path Parameters - **angle** (Angle) - Required - The angle of the animation. - **blurRadius** (CGFloat) - Optional - The radius of the blur applied to the mask. Defaults to 0. ### Request Example ```swift // Example usage would depend on the surrounding SwiftUI context ``` ### Response #### Success Response - AnyTransition: The wipe transition based on angle and blur radius. #### Response Example ```swift // No direct response example, as it's a transition type ``` ``` -------------------------------- ### Film Exposure Transition Source: https://github.com/emergetools/pow/blob/main/README.md A transition that fades the view in from complete darkness on insertion and fades it out to complete darkness on removal. ```swift static var filmExposure: AnyTransition ``` -------------------------------- ### particleLayer Source: https://github.com/emergetools/pow/blob/main/README.md Wraps a view in a particle layer with the given name, allowing particle effects to render without being clipped by ancestors. ```APIDOC ## particleLayer(name: AnyHashable) ### Description A view modifier that wraps the view in a particle layer with the specified name. This is useful for preventing particle effects from being clipped by their immediate ancestors, such as list rows. ### Parameters - **name** (AnyHashable) - The name for the particle layer. ``` -------------------------------- ### Flicker Transition Source: https://github.com/emergetools/pow/blob/main/README.md A transition that rapidly toggles the view's visibility multiple times before settling. The number of toggles can be specified. ```swift static var flicker: AnyTransition ``` ```swift static func flicker(count: Int) -> AnyTransition ``` -------------------------------- ### Default Vanish Transition Source: https://github.com/emergetools/pow/blob/main/README.md A transition that dissolves the view into many small particles. It performs the transition only on removal and uses a default ease-out animation if the current Animation is .default. ```swift static var vanish: AnyTransition ``` -------------------------------- ### Vanish Transition with Style, Mask, and EoFill Source: https://github.com/emergetools/pow/blob/main/README.md A transition that dissolves the view into many small particles following a given shape. It performs the transition only on removal and uses a default ease-out animation if the current Animation is .default. ```swift static func vanish(_ style: T, mask: S, eoFill: Bool = false) -> AnyTransition ``` -------------------------------- ### clock (blurRadius) Source: https://github.com/emergetools/pow/blob/main/README.md A transition using a clockwise sweep around the centerpoint of the view, with a specified blur radius applied to the mask. ```APIDOC ## clock(blurRadius: CGFloat) ### Description A transition using a clockwise sweep around the centerpoint of the view. A blur is applied to the mask with the specified radius. ### Parameters - **blurRadius** (CGFloat) - Required - The radius of the blur applied to the mask. ### Transition `.movingParts.clock(blurRadius:)` ### Type `static func clock(blurRadius: CGFloat) -> AnyTransition` ``` -------------------------------- ### Shine Effect Source: https://github.com/emergetools/pow/blob/main/README.md Highlights the view with a shine moving over the view. The shine moves from the top leading edge to bottom trailing edge. ```APIDOC ## Shine ### Description Highlights the view with a shine moving over the view. The shine moves from the top leading edge to bottom trailing edge. ### Method static var shine ### Endpoint N/A (SDK method) ### Parameters None ### Request Example ```swift static var shine: AnyChangeEffect ``` ### Response N/A ``` ```APIDOC ## Shine with Duration ### Description Highlights the view with a shine moving over the view. The shine moves from the top leading edge to bottom trailing edge. ### Method static func shine(duration: Double) ### Endpoint N/A (SDK method) ### Parameters - **duration** (Double) - The duration of the animation. ### Request Example ```swift static func shine(duration: Double) -> AnyChangeEffect ``` ### Response N/A ``` ```APIDOC ## Shine with Angle and Duration ### Description Highlights the view with a shine moving over the view. The angle is relative to the current `layoutDirection`, such that 0° represents sweeping towards the trailing edge and 90° represents sweeping towards the bottom edge. ### Method static func shine(angle: Angle, duration: Double = 1.0) ### Endpoint N/A (SDK method) ### Parameters - **angle** (Angle) - The angle of the animation. - **duration** (Double) - The duration of the animation. Defaults to 1.0. ### Request Example ```swift static func shine(angle: Angle, duration: Double = 1.0) -> AnyChangeEffect ``` ### Response N/A ``` -------------------------------- ### flicker (count) Source: https://github.com/emergetools/pow/blob/main/README.md A transition that toggles the visibility of the view multiple times before settling, with a specified number of toggles. ```APIDOC ## flicker(count: Int) ### Description A transition that toggles the visibility of the view multiple times before settling. The number of times the visibility is toggled is specified by the count parameter. ### Parameters - **count** (Int) - Required - The number of times the visibility is toggled. ### Transition `.movingParts.flicker(count:)` ### Type `static func flicker(count: Int) -> AnyTransition` ``` -------------------------------- ### Clock Transition Source: https://github.com/emergetools/pow/blob/main/README.md A transition that sweeps the view clockwise around its center. It can optionally apply a blur effect to the mask. ```swift static var clock: AnyTransition ``` ```swift static func clock(blurRadius: CGFloat) -> AnyTransition ``` -------------------------------- ### Shake Change Effect (Default) Source: https://github.com/emergetools/pow/blob/main/README.md Shakes the view when a change happens using the default shake rate. ```APIDOC ## Shake Change Effect (Default) ### Description Shakes the view when a change happens. ### Method Signature ```swift static var shake: AnyChangeEffect ``` ``` -------------------------------- ### Create a Particle Layer Source: https://github.com/emergetools/pow/blob/main/README.md Use the `particleLayer(name:)` modifier to wrap a view in a named particle layer. This prevents particle effects from being clipped by their immediate ancestors, such as list rows. ```swift func particleLayer(name: AnyHashable) -> some View ``` -------------------------------- ### Shine Effect with Angle and Duration Source: https://github.com/emergetools/pow/blob/main/README.md Applies a shine effect with a custom angle and duration. The angle is relative to the current layout direction. ```swift static func shine(angle: Angle, duration: Double = 1.0) -> AnyChangeEffect ``` -------------------------------- ### Vanish Transition with Style Source: https://github.com/emergetools/pow/blob/main/README.md A transition that dissolves the view into many small particles following a given shape. It performs the transition only on removal and uses a default ease-out animation if the current Animation is .default. ```swift static func vanish(_ style: S) -> AnyTransition ``` -------------------------------- ### Configure Jump Change Effect Source: https://github.com/emergetools/pow/blob/main/README.md This function signature defines the jump change effect, allowing you to specify the height of the jump. The view will then bounce before settling. ```swift static func jump(height: CGFloat) -> AnyChangeEffect ``` -------------------------------- ### Shake Change Effect (Custom Rate) Source: https://github.com/emergetools/pow/blob/main/README.md Shakes the view when a change happens with a specified shake rate. ```APIDOC ## Shake Change Effect (Custom Rate) ### Description An effect that shakes the view when a change happens. ### Method Signature ```swift static func shake(rate: ShakeRate) -> AnyChangeEffect ``` ### Parameters - **rate** (ShakeRate) - The rate of the shake. ``` -------------------------------- ### Sound Effect Feedback Source: https://github.com/emergetools/pow/blob/main/README.md Triggers a sound effect as feedback when a value changes. This effect does not interrupt other audio and depends on user settings. ```swift static func feedback(_ soundEffect: SoundEffect) -> AnyChangeEffect ``` -------------------------------- ### Sound Effect Feedback Source: https://github.com/emergetools/pow/blob/main/README.md Triggers a sound effect as feedback whenever a value changes. This effect will not interrupt or duck any other audio that may be currently playing. ```APIDOC ## Sound Effect Feedback ### Description Triggers a sound effect as feedback whenever a value changes. This effect will not interrupt or duck any other audio that may be currently playing. This effect is not guaranteed to be triggered; the effect running depends on the user's silent switch position and the current playback device. To relay important information to the user, you should always accompany audio effects with visual cues. ### Method static func feedback(_ soundEffect: SoundEffect) ### Endpoint N/A (SDK method) ### Parameters - **soundEffect** (SoundEffect) - The sound effect to trigger. ### Request Example ```swift static func feedback(_ soundEffect: SoundEffect) -> AnyChangeEffect ``` ### Response N/A ``` -------------------------------- ### Define Spray Change Effect Function Signature Source: https://github.com/emergetools/pow/blob/main/README.md This is the function signature for creating a spray change effect. It allows customization of the origin, rendering layer, and the particles to be emitted. ```swift static func spray(origin: UnitPoint = .center, layer: ParticleLayer = .local, @ViewBuilder _ particles: () -> some View) -> AnyChangeEffect ``` -------------------------------- ### Ping Change Effect (Shape) Source: https://github.com/emergetools/pow/blob/main/README.md Adds one or more shapes that slowly grow and fade-out behind the view. The shape will be colored by the current tint style. ```APIDOC ## Ping Change Effect (Shape) ### Description Adds one or more shapes that slowly grow and fade-out behind the view. The shape will be colored by the current tint style. ### Method Signature ```swift static func ping(shape: some InsettableShape, count: Int) -> AnyChangeEffect ``` ### Parameters - **shape** (some InsettableShape) - The shape to use for the effect. - **count** (Int) - The number of shapes to emit. ``` -------------------------------- ### Ping Change Effect (Shape and Style) Source: https://github.com/emergetools/pow/blob/main/README.md Adds one or more shapes that slowly grow and fade-out behind the view, with a specified shape style. ```APIDOC ## Ping Change Effect (Shape and Style) ### Description Adds one or more shapes that slowly grow and fade-out behind the view. ### Method Signature ```swift static func ping(shape: some InsettableShape, style: some ShapeStyle, count: Int) -> AnyChangeEffect ``` ### Parameters - **shape** (some InsettableShape) - The shape to use for the effect. - **style** (some ShapeStyle) - The style to use for the effect. - **count** (Int) - The number of shapes to emit. ``` -------------------------------- ### Haptic Feedback (Notification) Source: https://github.com/emergetools/pow/blob/main/README.md Triggers haptic feedback to communicate successes, failures, and warnings whenever a value changes, using `UINotificationFeedbackGenerator.FeedbackType`. ```APIDOC ## Haptic Feedback (Notification) ### Description Triggers haptic feedback to communicate successes, failures, and warnings whenever a value changes. ### Method Signature ```swift static func feedback(hapticNotification type: UINotificationFeedbackGenerator.FeedbackType) -> AnyChangeEffect ``` ### Parameters - **type** (UINotificationFeedbackGenerator.FeedbackType) - The feedback type to trigger. ``` -------------------------------- ### Delay Effect Source: https://github.com/emergetools/pow/blob/main/README.md Every change effect can be delayed to trigger the effect after some time. ```APIDOC ## Delay ### Description Every change effect can be delayed to trigger the effect after some time. ### Method func delay(_ delay: Double) ### Endpoint N/A (SDK method) ### Parameters - **delay** (Double) - The delay in seconds. ### Request Example ```swift func delay(_ delay: Double) -> AnyChangeEffect ``` ### Response N/A ``` -------------------------------- ### Jump Change Effect Source: https://github.com/emergetools/pow/blob/main/README.md Makes the view jump the given height and then bounces a few times before settling. ```APIDOC ## Jump Change Effect ### Description Makes the view jump the given height and then bounces a few times before settling. ### Method Signature ```swift static func jump(height: CGFloat) -> AnyChangeEffect ``` ### Parameters - **height** (CGFloat) - The height of the jump. ``` -------------------------------- ### Rise Change Effect Source: https://github.com/emergetools/pow/blob/main/README.md An effect that emits the provided particles from the origin point and slowly float up while moving side to side. ```APIDOC ## Rise Change Effect ### Description An effect that emits the provided particles from the origin point and slowly float up while moving side to side. ### Method Signature ```swift static func rise(origin: UnitPoint = .center, layer: ParticleLayer = .local, @ViewBuilder _ particles: () -> some View) -> AnyChangeEffect ``` ### Parameters - **origin** (UnitPoint) - The origin of the particle. Defaults to `.center`. - **layer** (ParticleLayer) - The `ParticleLayer` on which to render the effect. Defaults to `.local`. - **particles** (() -> some View) - The particles to emit. ``` -------------------------------- ### Define Rise Change Effect Source: https://github.com/emergetools/pow/blob/main/README.md This is the function signature for the rise change effect. It allows particles to be emitted from an origin and float upwards with side-to-side movement. ```swift static func rise(origin: UnitPoint = .center, layer: ParticleLayer = .local, @ViewBuilder _ particles: () -> some View) -> AnyChangeEffect ``` -------------------------------- ### Spin Effect (Default) Source: https://github.com/emergetools/pow/blob/main/README.md Spins the view around the default axis when a change occurs. ```swift static var spin: AnyChangeEffect ``` -------------------------------- ### Spray Change Effect Source: https://github.com/emergetools/pow/blob/main/README.md An effect that emits multiple particles in different shades and sizes moving up from the origin point. It can be customized with origin, layer, and the particles to emit. ```APIDOC ## Spray Change Effect ### Description An effect that emits multiple particles in different shades and sizes moving up from the origin point. ### Method Signature ```swift static func spray(origin: UnitPoint = .center, layer: ParticleLayer = .local, @ViewBuilder _ particles: () -> some View) -> AnyChangeEffect ``` ### Parameters - **origin** (UnitPoint) - The origin of the particles. Defaults to `.center`. - **layer** (ParticleLayer) - The `ParticleLayer` on which to render the effect. Defaults to `.local`. - **particles** (() -> some View) - The particles to emit. ``` -------------------------------- ### Spin Effect Source: https://github.com/emergetools/pow/blob/main/README.md Spins the view around the given axis when a change happens. ```APIDOC ## Spin ### Description Spins the view around the given axis when a change happens. ### Method static var spin ### Endpoint N/A (SDK method) ### Parameters None ### Request Example ```swift static var spin: AnyChangeEffect ``` ### Response N/A ``` ```APIDOC ## Spin with Parameters ### Description Spins the view around the given axis when a change happens. ### Method static func spin(axis: (x: CGFloat, y: CGFloat, z: CGFloat), anchor: UnitPoint = .center, anchorZ: CGFloat = 0, perspective: CGFloat = 1 / 6) ### Endpoint N/A (SDK method) ### Parameters - **axis** ((x: CGFloat, y: CGFloat, z: CGFloat)) - The x, y and z elements that specify the axis of rotation. - **anchor** (UnitPoint) - The location with a default of center that defines a point in 3D space about which the rotation is anchored. - **anchorZ** (CGFloat) - The location with a default of 0 that defines a point in 3D space about which the rotation is anchored. - **perspective** (CGFloat) - The relative vanishing point with a default of 1 / 6 for this rotation. ### Request Example ```swift static func spin(axis: (x: CGFloat, y: CGFloat, z: CGFloat), anchor: UnitPoint = .center, anchorZ: CGFloat = 0, perspective: CGFloat = 1 / 6) -> AnyChangeEffect ``` ### Response N/A ``` -------------------------------- ### Delay Modifier Source: https://github.com/emergetools/pow/blob/main/README.md A modifier to delay the application of any change effect by a specified number of seconds. ```swift func delay(_ delay: Double) -> AnyChangeEffect ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.