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
ScaleTransitioninstance 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
ScaleTransitioninstance.Declaration
Swift
public init(duration: Double = 0.15, initialScale: CGFloat = 0.8, threshold: CGFloat = 0.5)Parameters
durationThe duration of the animation.
initialScaleThe initial scale factor used before the action button percent visible is greater than the threshold.
thresholdThe percent visible threshold that triggers the scaling animation.
Return Value
The new
ScaleTransitioninstance.
View on GitHub
ScaleTransition Structure Reference