Back to Swipecellkit

ScaleTransition

docs/docsets/SwipeCellKit.docset/Contents/Resources/Documents/Structs/ScaleTransition.html

2.7.12.1 KB
Original Source

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%.

`

                default
                `

Returns a ScaleTransition instance with default transition options.

Declaration

Swift

public static var `default`: ScaleTransition

`

                duration
                `

The duration of the animation.

Declaration

Swift

public let duration: Double

`

                initialScale
                `

The initial scale factor used before the action button percent visible is greater than the threshold.

Declaration

Swift

public let initialScale: CGFloat

`

                threshold
                `

The percent visible threshold that triggers the scaling animation.

Declaration

Swift

public let threshold: CGFloat

`

                init(duration:initialScale:threshold:)
                `

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.

© 2018 Mohammad Kurabi. All rights reserved. (Last updated: 2018-05-26)

Generated by jazzy ♪♫ v0.8.4, a Realm project.