ScaleTransition
public struct ScaleTransition: SwipeActionTransitioning
A scale transition object drives the custom appearance of actions during transition.
As button’s percentage visibility crosses the threshold
, the ScaleTransition
object will animate from initialScale
to identity
. The default settings provide a pop-like
effect as the buttons are exposed more than 50%.
-
Returns a
ScaleTransition
instance with default transition options.Declaration
Swift
public static var `default`: ScaleTransition
-
The duration of the animation.
Declaration
Swift
public let duration: Double
-
The initial scale factor used before the action button percent visible is greater than the threshold.
Declaration
Swift
public let initialScale: CGFloat
-
The percent visible threshold that triggers the scaling animation.
Declaration
Swift
public let threshold: CGFloat
-
Contructs a new
ScaleTransition
instance.Declaration
Swift
public init(duration: Double = 0.15, initialScale: CGFloat = 0.8, threshold: CGFloat = 0.5)
Parameters
duration
The duration of the animation.
initialScale
The initial scale factor used before the action button percent visible is greater than the threshold.
threshold
The percent visible threshold that triggers the scaling animation.
Return Value
The new
ScaleTransition
instance.