ScrollStep

public struct ScrollStep : MarqueeStep

ScrollStep types define the label position at a specified time delta since the last ScrollStep step, as well as the animation curve to that position and edge fade state at the position

  • An enum that provides the possible positions defined by a ScrollStep

    • home: The starting, default position of the label
    • away: The calculated position that results in the entirety of the label scrolling past.
    • partial(CGFloat): A fractional value, specified by the associated CGFloat value, between the home and away positions (must be between 0.0 and 1.0).

    The away position depends on the MarqueeLabel type value.

    • For left, leftRight, right, and rightLeft types, the away position means the trailing edge of the label is visible. For leftRight and rightLeft default types, the scroll animation reverses direction after reaching this point and returns to the home position.
    • For continuous and continuousReverse types, the away position is the location such that if the scroll is completed at this point (i.e. the animation is removed), there will be no visible change in the label appearance.

    Declaration

    Swift

    public enum Position
  • The desired time between this step and the previous ScrollStep in a sequence.

    Declaration

    Swift

    public let timeStep: CGFloat
  • The animation curve to utilize between the previous ScrollStep in a sequence and this step.

    Note

    The animation curve value for the first ScrollStep in a sequence has no effect.

    Declaration

    Swift

    public let timingFunction: UIView.AnimationCurve
  • The position of the label for this scroll step.

    See also

    Position

    Declaration

    Swift

    public let position: Position
  • The option set defining the edge fade state for this scroll step.

    Possible options include .leading and .trailing, corresponding to the leading edge of the label scrolling (i.e. the direction of scroll) and trailing edge of the label.

    Declaration

    Swift

    public let edgeFades: EdgeFade