AnyTransition

public extension AnyTransition
  • A transition which uses a blurring effect.

    See also: SwiftUI doc for blur

    Declaration

    Swift

    static func blur(radius: Double) -> AnyTransition

    Parameters

    radius

    The radial size of the blur. A blur is more diffuse when its radius is large. Noticable values are greater than 1. Should not be 0.

    Return Value

    The constructed transition.

  • A transition which uses a brighness effect.

    See also: SwiftUI doc for brightness

    Declaration

    Swift

    static func brightness(_ amount: Double = 1) -> AnyTransition

    Parameters

    amount

    A value between 0 (no effect) and 1 (full white brightening) that represents the intensity of the brightness effect. Defaults to 1. Should not be 0.

    Return Value

    The constructed transition.

  • A custom transition using a scaling circle.

    Declaration

    Swift

    static var circleShape: AnyTransition { get }
  • A transition which changes the contrast of a view.

    See also: SwiftUI doc for contrast

    Declaration

    Swift

    static func contrast(_ contrast: Double = 0) -> AnyTransition

    Parameters

    contast

    The intensity of color contrast to apply. Negative values invert colors in addition to applying contrast. Ranges from 1 (normal contast) to -1 (inverted contrast), defaults to 0 (no contrast). Should not be 1.

    Return Value

    The constructed transition.

  • A transition which uses a brighness effect.

    See also: SwiftUI doc for huerotation

    Declaration

    Swift

    static func hueRotation(_ angle: Angle = .degrees(180)) -> AnyTransition

    Parameters

    degree

    The hue rotation angle to apply to the colors in this view. 0° means no shift and 180° a total shift. Defaults to 180°. Should not be zero.

    Return Value

    The constructed transition.

  • A custom transition using a scaling rectangle.

    Declaration

    Swift

    static var rectangleShape: AnyTransition { get }
  • A transition which uses a brighness effect.

    See also: SwiftUI doc for saturation

    Declaration

    Swift

    static func saturation(_ amount: Double = 0) -> AnyTransition

    Parameters

    amount

    A value between 0 (no saturation = gray) and 1 (full saturation = full color) that represents the amount of saturation to apply. Defaults to 0. Should not be 1.

    Return Value

    The constructed transition.

  • A transition which doesn’t apply any visible changes, but is not the identity because using SwiftUI’s identity leads to results not expected when used in combination with a second transition animation executed simultaniously by the other content view. This should be used for one view to remain unchanged while the counter-part view uses a visible transition animation.

    Declaration

    Swift

    static var `static`: AnyTransition { get }
  • A custom transition using horizontal or vertical stripes to blend over.

    Declaration

    Swift

    static func stripes(stripes: Int, horizontal: Bool, inverted: Bool = false) -> AnyTransition

    Parameters

    stripes

    The number of stripes the view should be sliced into.

    horizontal

    Set to true to lay the stripes out horizontally, false for vertically.

  • A custom transition using a 3D geometry effect.

    Source by SwiftUI-Lab

    Declaration

    Swift

    static var tiltAndFly: AnyTransition { get }