Back to Swipecellkit

SwipeExpansionStyle

docs/Structs/SwipeExpansionStyle.html

2.7.16.1 KB
Original Source

SwipeExpansionStyle

public struct SwipeExpansionStyle

Describes the expansion style. Expansion is the behavior when the cell is swiped past a defined threshold.

`

                selection
                `

The default action performs a selection-type behavior. The cell bounces back to its unopened state upon selection and the row remains in the table/collection view.

Declaration

Swift

public static var selection: SwipeExpansionStyle

`

                destructive
                `

The default action performs a destructive behavior. The cell is removed from the table/collection view in an animated fashion.

Declaration

Swift

public static var destructive: SwipeExpansionStyle

`

                destructiveAfterFill
                `

The default action performs a destructive behavior after the fill animation completes. The cell is removed from the table/collection view in an animated fashion.

Declaration

Swift

public static var destructiveAfterFill: SwipeExpansionStyle

`

                fill
                `

The default action performs a fill behavior.

Note

The action handle must call SwipeAction.fulfill(style:) to resolve the fill expansion.

Declaration

Swift

public static var fill: SwipeExpansionStyle

`

                destructive(automaticallyDelete:timing:)
                `

Returns a SwipeExpansionStyle instance for the default action which peforms destructive behavior with the specified options.

Declaration

Swift

public static func destructive(automaticallyDelete: Bool, timing: FillOptions.HandlerInvocationTiming = .with) -> SwipeExpansionStyle

Parameters

| automaticallyDelete |

Specifies if row/item deletion should be peformed automatically. If false, you must call SwipeAction.fulfill(with style:) at some point while/after your action handler is invoked to trigger deletion.

| | timing |

The timing which specifies when the action handler will be invoked with respect to the fill animation.

|

Return Value

The new SwipeExpansionStyle instance.

`

                target
                `

The relative target expansion threshold. Expansion will occur at the specified value.

Declaration

Swift

public let target: Target

`

                additionalTriggers
                `

Additional triggers to useful for determining if expansion should occur.

Declaration

Swift

public let additionalTriggers: [Trigger]

`

                elasticOverscroll
                `

Specifies if buttons should expand to fully fill overscroll, or expand at a percentage relative to the overscroll.

Declaration

Swift

public let elasticOverscroll: Bool

`

                completionAnimation
                `

Specifies the expansion animation completion style.

Declaration

Swift

public let completionAnimation: CompletionAnimation

`

                minimumTargetOverscroll
                `

Specifies the minimum amount of overscroll required if the configured target is less than the fully exposed action view.

Declaration

Swift

public var minimumTargetOverscroll: CGFloat = 20

`

                targetOverscrollElasticity
                `

The amount of elasticity applied when dragging past the expansion target.

Note

Default value is 0.2. Valid range is from 0.0 for no movement past the expansion target, to 1.0 for unrestricted movement with dragging.

Declaration

Swift

public var targetOverscrollElasticity: CGFloat = 0.2

`

                init(target:additionalTriggers:elasticOverscroll:completionAnimation:)
                `

Contructs a new SwipeExpansionStyle instance.

Declaration

Swift

public init(target: Target, additionalTriggers: [Trigger] = [], elasticOverscroll: Bool = false, completionAnimation: CompletionAnimation = .bounce)

Parameters

| target |

The relative target expansion threshold. Expansion will occur at the specified value.

| | additionalTriggers |

Additional triggers to useful for determining if expansion should occur.

| | elasticOverscroll |

Specifies if buttons should expand to fully fill overscroll, or expand at a percentage relative to the overscroll.

| | completionAnimation |

Specifies the expansion animation completion style.

|

Return Value

The new SwipeExpansionStyle instance.

`

                Target
                `

Describes the relative target expansion threshold. Expansion will occur at the specified value.

See more

Declaration

Swift

public enum Target

`

                Trigger
                `

Describes additional triggers to useful for determining if expansion should occur.

See more

Declaration

Swift

public enum Trigger

`

                CompletionAnimation
                `

Describes the expansion animation completion style.

See more

Declaration

Swift

public enum CompletionAnimation

`

                FillOptions
                `

Specifies the options for the fill completion animation.

See more

Declaration

Swift

public struct FillOptions

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

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